What it does
CORS is the browser rule that decides whether JavaScript on one origin may read a response from another. It is enforced by the browser, not the server, and it is a common source of “works in curl, fails in the app” bugs. This checker inspects the headers that control it.
How it works
A simple cross-origin request is sent without a preflight. The browser checks Access-Control-Allow-Origin (ACAO) on the response; if it does not match the page's origin or is not *, the script cannot read the body.
Anything beyond simple — custom headers, methods other than GET/HEAD/POST with simple content types, or credentials — triggers an OPTIONS preflight. The server must answer with allowed methods and headers, and the browser caches that decision for the max-age.
Credentials change the rules. With credentials: include, ACAO must be an exact origin; * is invalid. Access-Control-Allow-Credentials must be true, and the server must not reflect arbitrary origins, or it becomes a data-leak vector.
Echoing the request's Origin back is common in frameworks. It works, but it means any site can read authenticated responses if credentials are also allowed. Pair reflection with an allowlist, and send Vary: Origin so caches do not mix responses.
A null origin appears in sandboxed iframes and file:// pages. Allowing null is risky because it is easy to obtain. Treat it as a deliberate exception, not a default.
When to use it
- Debug a browser CORS error in an API integration.
- Check whether credentials are allowed with the correct origin rules.
- Verify preflight caching after a configuration change.
- Audit an API that reflects any Origin header.
Glossary
- Origin
- Scheme, host and port of a page, sent in the Origin header.
- Preflight
- An OPTIONS request the browser sends before a non-simple cross-origin request.
- ACAO
- Access-Control-Allow-Origin, the response header that permits reading.
- Credentials
- Cookies, TLS client certs or Authorization headers included in a request.
- Vary: Origin
- A cache directive preventing a response for one origin being reused for another.
Frequently asked questions
Why does curl work but the browser block the response?+
CORS is a browser rule. curl does not enforce it, so a missing or wrong ACAO is invisible there but fatal in a page.
Can ACAO be * with credentials?+
No. The combination is invalid. With credentials, ACAO must be a specific origin and Access-Control-Allow-Credentials must be true.
Is reflecting Origin unsafe?+
It is unsafe if the endpoint also allows credentials or exposes sensitive data, because any site can then read it. Use an allowlist and Vary: Origin.
Why is the preflight cached for so long?+
Access-Control-Max-Age controls it. A long value reduces requests but delays configuration changes; browsers also cap it.
Does CORS protect the server?+
No. It protects users from cross-origin reads. The server still needs authentication and authorization for every endpoint.
API & MCP
The same result envelope is available over REST and MCP. Replace the sample value with your own target.
curl "https://100www.dev/api/v1/tools/cors-checker?u=https%3A%2F%2Fapi.github.com"Shareable result
https://100www.dev/tools/cors-checker?u=https%3A%2F%2Fapi.github.com

100www engineering
EditorialReviewed by Steve · · Report an error
Tested from the 100www probe network; results vary by location and network.


