Larry K
Larry K

Reputation: 49104

Do CORS Preflight requests include the request's headers?

When I send a POST CORS request from a browser, the browser first sends a preflight OPTIONS request to the server.

If my POST includes an Authorization header, is that header including in the Options request?

Upvotes: 0

Views: 104

Answers (1)

Larry K
Larry K

Reputation: 49104

When I send a POST CORS request from a browser, the browser first sends a preflight OPTIONS request to the server.

If my POST includes an Authorization header, is that header including in the Options request?

No. The OPTIONS request will include a header of

access-control-request-headers: authorization

to indicate that the client software (running in the browser) wants to sent an authorization header, but the header's value itself is not sent until the POST request.

Upvotes: 1

Related Questions