Find out exactly why the browser blocks your cross-origin request. Describe the request — origin, method, headers, credentials — and paste the server's Access-Control headers; the debugger tells you whether it passes, what triggers a preflight, every rule that fails, and the corrected headers with Express and Nginx snippets.
| Request | Preflight? |
|---|---|
| GET with Accept header | No |
| POST form (urlencoded) | No |
| POST JSON | Yes |
| Any request with Authorization | Yes |
| PUT / DELETE / PATCH | Yes |
CORS is enforced by browsers only.
With credentials, the browser requires the exact origin to be echoed and Allow-Credentials: true.
Non-simple methods or headers like Content-Type: application/json or Authorization trigger a preflight.
Only seven headers are readable by default; others must be in Access-Control-Expose-Headers.
No. It applies the rules to what you enter.
The inputs are checked against the Fetch standard's CORS rules without sending any request. A preflight is needed when the method isn't GET, HEAD or POST, or when the code sets a header that isn't CORS-safelisted. Content-Type counts as safelisted only for application/x-www-form-urlencoded, multipart/form-data and text/plain, which is why JSON APIs always preflight. The checks are: - **Origin:** Access-Control-Allow-Origin must be * or exactly the page's origin. It can't be a list, and * is forbidden with credentials. - **Credentials:** they need Access-Control-Allow-Credentials: true. - **Methods and headers:** preflighted requests need the method and every non-safelisted header allowed. A * wildcard covers them only without credentials, and never covers Authorization. - **Reading headers:** response headers other than the seven safelisted ones must be in Access-Control-Expose-Headers for JavaScript to read them. The tool then writes the headers the server should send, including Vary: Origin when the origin is echoed.