0

I have CORS setup with System.Web.Http.Cors (Nightly builds). Everything is working fine, until if I want to disable a CORS support for a method then iam not able to do so. A POST method of mine having [DisableCors] attribute above it is hit by debugger and data in posted in database. But the only good point in that is, the response ends with error (shown in firebug).

I dont want the method to save data when the request is from cross origin. It should filter it out from methods top only (like Authorize attribute in MVC).

Your help would be good support factor.

Thanks.

4

1 回答 1

2

对于一个简单的 HTTP 请求(基本上是带有 form-url-encoded 的 GET 和 POST),请求仍然在服务器上执行,但不允许客户端访问结果。CORS(在这种情况下)仅在允许客户端使用结果时向浏览器指示。

于 2013-09-05T13:13:55.950 回答