CORS Debugger

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.

Simple vs preflighted

RequestPreflight?
GET with Accept headerNo
POST form (urlencoded)No
POST JSONYes
Any request with AuthorizationYes
PUT / DELETE / PATCHYes

When to use it

  1. Fix 'blocked by CORS policy' errors in the console.
  2. Understand why a JSON POST sends an OPTIONS preflight.
  3. Set up credentials (cookies) across subdomains.
  4. Review an API's CORS config before release.

How to Use

  1. Describe the browser request.
  2. Enter the server's response headers.
  3. Read the verdict and copy the fixed headers or config.

Features

  1. Preflight detection
  2. Wildcard + credentials rule
  3. Method and header checks
  4. Expose-Headers check
  5. Fixed headers with Vary
  6. Express and Nginx snippets

FAQs

Why does my request work in Postman but not the browser?

CORS is enforced by browsers only.

Why can't I use * with cookies?

With credentials, the browser requires the exact origin to be echoed and Allow-Credentials: true.

Why is an OPTIONS request sent?

Non-simple methods or headers like Content-Type: application/json or Authorization trigger a preflight.

Why can't my JavaScript read a response header?

Only seven headers are readable by default; others must be in Access-Control-Expose-Headers.

Does this send requests?

No. It applies the rules to what you enter.

Technical Details

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.

Security Tools

Security Tools

  • RSA Key Generator
  • SRI Hash Generator
  • Permissions-Policy Builder
  • htpasswd Generator
  • Common Port Reference
  • Google Dork Generator
  • Google Search Operators
  • CRC Generator