Skip to content

Commit

Permalink
Remove Access-Control-Allow-Methods from request header list (#33673)
Browse files Browse the repository at this point in the history
Fixes #33660 
Access-Control-Allow-Methods is a response header, not a request header
  • Loading branch information
tdykstra authored Sep 21, 2024
1 parent 91c795a commit 573b59b
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion aspnetcore/security/cors.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ The preflight request uses the [HTTP OPTIONS](https://developer.mozilla.org/docs

* [Access-Control-Request-Method](https://developer.mozilla.org/docs/Web/HTTP/Headers/Access-Control-Request-Method): The HTTP method that will be used for the actual request.
* [Access-Control-Request-Headers](https://developer.mozilla.org/docs/Web/HTTP/Headers/Access-Control-Allow-Headers): A list of request headers that the app sets on the actual request. As stated earlier, this doesn't include headers that the browser sets, such as `User-Agent`.
* [Access-Control-Allow-Methods](https://developer.mozilla.org/docs/Web/HTTP/Headers/Access-Control-Allow-Methods)

If the preflight request is denied, the app returns a `200 OK` response but doesn't set the CORS headers. Therefore, the browser doesn't attempt the cross-origin request. For an example of a denied preflight request, see the [Test CORS](#testc6) section of this document.

Expand Down

0 comments on commit 573b59b

Please sign in to comment.