Symptom
Access to XMLHttpRequest from origin has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status" error.
Access to XMLHttpRequest from origin has been blocked by CORS policy: Cannot parse Access-Control-Allow-Methods response header field in preflight response.
Cause
Invalid CORS header values are causing this problem.
Resolution
CORS Header Name
|
Example
|
TRUE
|
|
Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers,Authorization
|
|
Access-Control-Allow-Methods - HTTP | MDN (mozilla.org)
|
GET,POST,PUT,OPTIONS
|
*
|
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.