AI Tools Free

CORS Header Checker & Preflight Simulator

Simulate browser WHATWG Fetch CORS policy checks offline—verifying whether your request triggers an `OPTIONS` preflight, auditing `Access-Control-Allow-Origin`, `Methods`, `Headers`, and `Credentials`, and pinpointing the exact rule blocking your frontend request.

Free to useNo sign-upRuns in your browser
Enter your details

Enter the inputs, then select Validate CORS Headers.

Exact scheme, host, and optional port of the frontend page making the fetch/XHR call.

HTTP method used by the actual cross-origin request.

When credentials='include', the W3C Fetch spec forbids wildcard '*' in Access-Control-Allow-Origin, Methods, and Headers.

Request headers sent by fetch() (e.g. Authorization, Content-Type, X-Api-Key).

Paste the server's HTTP response headers (Key: Value per line).

Your result
Enter your details

Result will appear here

How the Offline CORS Policy Simulator Works

Enter your frontend's `Origin`, HTTP method, credentials mode, and request headers alongside your backend's response headers.

Preflight Trigger: Method not in {GET,HEAD,POST} OR non-safelisted Request Header; Credentialed Rule: if credentials='include', ACAO == requestOrigin (never '*') AND ACAC == 'true'.

Evaluates the exact WHATWG Fetch CORS specification offline without sending external network traffic—catching wildcard-with-credentials conflicts, missing preflight headers, and poison-cache risks when `Vary: Origin` is omitted.

CORS Header Checker & Preflight Simulator workflow overview
Workflow overview for CORS Header Checker & Preflight Simulator.

WHATWG Fetch CORS Header Rules & Browser Error Reference Table

Quick lookup of the most common CORS header combinations and how browsers evaluate them.

Scenario / ModeRequired `Allow-Origin`Required `Allow-Credentials`Required `Allow-Headers`Common Pitfall
Public API (`credentials: omit`)`*` or exact `Origin`Omitted`*` or explicit list (except `Authorization`)`Authorization` never matches `*`; must be explicit
Authenticated (`credentials: include`)Exact `Origin` (`https://...`)`true` (case-sensitive)Explicit header names (never `*`)Returning `ACAO: *` with `ACAC: true` is blocked
JSON `POST` / `PUT` / `DELETE``*` or exact `Origin`Matches credentials modeMust include `content-type`Forgetting `OPTIONS` handler returns `404`/`405` on preflight
Dynamic Origin Allowlist + CDNExact matched `Origin`Optional / `true`Explicit listOmitting `Vary: Origin` causes CDN cache poisoning

How to use CORS Header Checker & Preflight Simulator step by step

Enter the values for your scenario, verify the units, and run the calculation.

Enter the inputs

Start by entering the required fields in the CORS Header Checker & Preflight Simulator form above.

CORS Header Checker & Preflight Simulator step 1: Enter the inputs
Step 1 workflow overview for CORS Header Checker & Preflight Simulator.

Verify units and assumptions

Match each value to the unit or format shown next to the input box before running the calculation.

CORS Header Checker & Preflight Simulator step 2: Verify units and assumptions
Step 2 workflow overview for CORS Header Checker & Preflight Simulator.

Run and export your result

Select Validate CORS Headers, inspect the primary metric and breakdown cards, then use Copy result or Download result.txt.

CORS Header Checker & Preflight Simulator step 3: Run and export your result
Step 3 workflow overview for CORS Header Checker & Preflight Simulator.

Worked examples for CORS Header Checker & Preflight Simulator

Compare baseline and alternative runs for CORS Header Checker & Preflight Simulator before exporting the result.

Baseline example

Validate HTTP Access-Control-Allow-* CORS response headers against browser request Origin, Method, Headers, and Credentials mode. Diagnose preflight OPTIONS failures.

CORS Header Checker & Preflight Simulator example 1: Baseline example
Worked example 1 for CORS Header Checker & Preflight Simulator.

Comparison scenario

Preflight Trigger: Method not in {GET,HEAD,POST} OR non-safelisted Request Header; Credentialed Rule: if credentials='include', ACAO == requestOrigin (never '*') AND ACAC == 'true'.

CORS Header Checker & Preflight Simulator example 2: Comparison scenario
Worked example 2 for CORS Header Checker & Preflight Simulator.

Boundary check before exporting

Evaluates the exact WHATWG Fetch CORS specification offline without sending external network traffic—catching wildcard-with-credentials conflicts, missing preflight headers, and poison-cache risks when `Vary: Origin` is omitted.

CORS Header Checker & Preflight Simulator example 3: Boundary check before exporting
Worked example 3 for CORS Header Checker & Preflight Simulator.

How to interpret the CORS Header Checker & Preflight Simulator output

Review the calculated output alongside your entered parameters and unit conventions.

Evaluates the exact WHATWG Fetch CORS specification offline without sending external network traffic—catching wildcard-with-credentials conflicts, missing preflight headers, and poison-cache risks when `Vary: Origin` is omitted.

How to interpret CORS Header Checker & Preflight Simulator results
Result interpretation guide for CORS Header Checker & Preflight Simulator.

Production CORS Deployment Checklist

Verify these three server behaviors before shipping CORS changes.

Preflight Trigger: Method not in {GET,HEAD,POST} OR non-safelisted Request Header; Credentialed Rule: if credentials='include', ACAO == requestOrigin (never '*') AND ACAC == 'true'. Evaluates the exact WHATWG Fetch CORS specification offline without sending external network traffic—catching wildcard-with-credentials conflicts, missing preflight headers, and poison-cache risks when `Vary: Origin` is omitted.

Scope limits and assumptions for CORS Header Checker & Preflight Simulator
Assumptions and input boundaries for CORS Header Checker & Preflight Simulator.

CORS Header Checker & Preflight Simulator: common questions

Answers about using CORS Header Checker & Preflight Simulator and understanding its results.

Why does the browser block `Access-Control-Allow-Origin: *` when `credentials: 'include'` is set?

Under the WHATWG Fetch specification, any request with `credentials: 'include'` (or `xhr.withCredentials = true`) attaches sensitive browser cookies or HTTP authentication headers. Allowing a wildcard `*` would let any untrusted website read authenticated responses. Therefore, the server must echo the exact origin (e.g. `Access-Control-Allow-Origin: https://app.example.com`) and return `Access-Control-Allow-Credentials: true`.

What triggers a CORS `OPTIONS` preflight request?

A browser skips preflight only for 'simple requests' (GET, HEAD, or POST with a safelisted Content-Type of `text/plain`, `application/x-www-form-urlencoded`, or `multipart/form-data` and no custom headers). Sending `PUT`, `PATCH`, `DELETE`, `Content-Type: application/json`, or an `Authorization` header automatically triggers a preflight `OPTIONS` request first.

Why is `Vary: Origin` required when dynamically echoing `Access-Control-Allow-Origin`?

If your server dynamically sets `Access-Control-Allow-Origin` from an allowlist without sending `Vary: Origin`, a CDN or browser HTTP cache may cache the response generated for `https://site-a.com` and serve that same header to `https://site-b.com`, causing intermittent CORS failures.

Why does `Authorization` fail even when `Access-Control-Allow-Headers: *` is returned?

First, if `credentials: 'include'` is active, `*` is ignored for all `Access-Control-Allow-*` headers. Second, per the Fetch spec, even on non-credentialed requests, the `Authorization` header is never matched by a wildcard `Access-Control-Allow-Headers: *`—it must be explicitly listed as `Access-Control-Allow-Headers: Authorization`.

Try your own values

Choose another tool for your next calculation, conversion, or text task.

Validate CORS Headers