Skip to main content
ToolsHub

CORS Tester / Preflight Checker

Send real OPTIONS + actual probes from a guarded server route, then get pass/fail checks with fix hints for nginx, Express, Spring, and raw headers.

Updated

CORS preflight input

No CORS check yet

Enter a target endpoint and origin, then run the check to see the pass/fail verdict and response headers here.

How to use CORS Tester / Preflight Checker

CORS Tester / Preflight Checker runs a true server-side preflight and follow-up request so you can diagnose cross-origin policy errors with clear evidence instead of guesswork. Enter endpoint URL, intended browser origin, method, requested headers, and credential mode; the tool sends OPTIONS + actual probes, keeps only relevant CORS headers, and evaluates pass/fail checks for origin match, allowed methods, header coverage, and credentials. Failed checks include concrete remediation snippets for nginx, Express, Spring, and raw headers, making it easier to move from browser error messages to actionable server fixes quickly.

  1. Enter the target endpoint URL and the exact origin your frontend uses, then choose the intended HTTP method.
  2. List any custom request headers (for example authorization or x-request-id) and toggle credentials if cookies/auth are needed.
  3. Run the check to execute OPTIONS preflight and the actual request from the server-side probe route.
  4. Review verdict rows for origin, methods, headers, and credentials, then expand failed checks for stack-specific fixes.
  5. Open raw preflight and actual header tables to confirm final Access-Control values after proxies/CDNs.

Common CORS errors decoded

“No Access-Control-Allow-Origin header” usually means the server never emitted ACAO for that route, while “CORS policy: credential is not supported if ACAO is *” means wildcard origin conflicts with cookies/auth requirements. “Request header field X is not allowed by Access-Control-Allow-Headers” points to incomplete allow-header lists in preflight responses. Browser console messages often collapse these scenarios into generic failures, so checking preflight status and exact header values side by side is critical. This tool decodes each condition into plain-English outcomes and ties them to targeted fix guidance, reducing time spent guessing across middleware, reverse proxies, and application frameworks.

Why preflight and actual responses must both be correct

A successful OPTIONS preflight alone does not guarantee browser success. Browsers still validate CORS headers on the actual response, including Access-Control-Allow-Origin and Access-Control-Allow-Credentials when needed. In production stacks, preflight might be handled by one layer (edge proxy) while actual responses come from another (application service), creating mismatches that only appear at runtime. Reliable diagnostics therefore require observing both responses as a pair: methods and request headers must be allowed during preflight, and origin/credentials must remain valid on the final response. By capturing both stages, teams can isolate whether failures come from policy logic, route-specific config, or upstream infrastructure overrides.

Operational hardening: Vary and max-age considerations

Two often-overlooked headers affect CORS behavior at scale. Vary: Origin helps caches avoid serving one origin’s CORS response to a different origin by mistake, which can cause inconsistent browser failures across regions. Access-Control-Max-Age controls how long preflight results are cached client-side; too low increases latency, too high can delay rollout of policy changes if mistakes are cached. While these headers do not decide basic allow/deny alone, they strongly influence reliability and performance in real deployments with CDNs and shared caches. Treat them as operational tuning knobs after core policy checks pass.

Worked examples

Wildcard + credentials mismatch

Inputs: Origin app.example, credentials ON, ACAO=*

Result: Fail verdict explains wildcard cannot be used with credentials

Missing allow-header issue

Inputs: Requested header authorization not in ACAH

Result: Fail row flags missing header and provides fix snippets

Healthy credentialed setup

Inputs: Exact origin, PUT allowed, ACAH list complete

Result: Overall pass with info rows for max-age and expose-headers

Glossary

Preflight request
An OPTIONS request browsers send before certain cross-origin requests to confirm policy permissions.
Access-Control-Allow-Origin
Response header declaring which origin may read the cross-origin response in browser JavaScript.
Access-Control-Allow-Headers
Preflight response header listing non-safelisted request headers permitted for actual requests.
Credentialed request
A browser request that includes cookies or authenticated context and requires stricter CORS rules.
Vary: Origin
Caching hint indicating responses differ by Origin header, preventing incorrect cache reuse across origins.

Related reading

Free · No spam

Get weekly tool tips & updates

New tools, power-user tips, and productivity hacks — delivered free every Friday.

No spam, ever. Unsubscribe with one click.

Related Developer Tools

Explore all Developer Tools.