Q43: What triggers a CORS Preflight OPTIONS request in browsers?
A preflight OPTIONS request is sent automatically by browsers prior to cross-origin requests if: 1) Method is NOT GET, HEAD, or POST. 2) Custom HTTP headers (like Authorization) are included. 3) Content-Type is not simple (application/json).
Key Takeaways
Preflight verifies cross-origin permissions using HTTP
OPTIONSrequests.Triggered by non-simple headers or non-simple Content-Type values.
Knowledge Check
Which Content-Type triggers a CORS preflight request when sent in a POST request?