Build CORS response headers and find out whether a given request triggers a preflight, with the two mistakes browsers enforce silently flagged.
5 headers
The probe request below needs a preflight.
Scheme, host and port. No path, no trailing slash, no wildcard subdomain.
Anything beyond Accept, Accept-Language, Content-Language, Content-Type and Range.
Without these, JavaScript can read only seven response headers.
Chromium caps this at 7,200 and Firefox at 86,400.
Access-Control-Allow-Origin: https://app.example.com
Vary: Origin
Access-Control-Allow-Methods: GET, POST
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Max-Age: 600Access-Control-Allow-Originhttps://app.example.comVaryOriginAccess-Control-Allow-MethodsGET, POSTAccess-Control-Allow-HeadersContent-Type, AuthorizationAccess-Control-Max-Age600These methods do not themselves need a preflight
GET, HEAD and POST are simple methods. A preflight is still sent if the request carries a non-safelisted header or an unusual Content-Type.
Only seven response headers will be readable by the page
Without Expose-Headers, JavaScript can read Cache-Control, Content-Language, Content-Length, Content-Type, Expires, Last-Modified and Pragma, and nothing else. A custom header — a pagination total, a rate-limit count — is invisible until it is listed here, and this is the usual reason a header the network tab clearly shows comes back null in code.
CORS Configuration Builder runs entirely on your device — nothing is uploaded, and no origin is contacted to test the policy.
You’re on the Free plan. Compare plans
The preflight rule is narrower than most people remember. A request avoids a preflight only if the method is GET, HEAD or POST, every header is CORS-safelisted, and — if Content-Type is set — it is one of exactly three values. `application/json` is not one of them, which is why nearly every API call is preflighted and why adding an Authorization header guarantees it.
Two mistakes are errors here rather than notes, because the browser enforces both without a word in your console. A wildcard origin combined with credentials fails the request outright; to allow credentials you must echo a specific origin you have checked against your own list, and `Vary: Origin` then becomes mandatory or a cache will serve one site's response to another.
The second is Expose-Headers. Without it, JavaScript can read exactly seven response headers and nothing else — so a pagination total or a rate-limit count that the network tab clearly shows comes back null in code. That is the single most reported CORS confusion after the wildcard one.
Access-Control-Allow-Origin carries one origin or `*` and nothing else. A comma-separated list is not valid, which means your server has to compare the request's Origin against your list and echo the match. The builder shows the shape and says so rather than generating something that cannot work.
Nothing is requested. The headers are generated; testing them against a real browser is still yours to do.
Because the browser rejects a credentialed response whose Access-Control-Allow-Origin is `*`, and it does so without an explanation in your code. To allow credentials, echo the specific requesting origin after checking it against a fixed list, and send `Vary: Origin`.
Without Access-Control-Expose-Headers, a cross-origin page can read only seven headers: Cache-Control, Content-Language, Content-Length, Content-Type, Expires, Last-Modified and Pragma. Anything custom is invisible until it is listed, even though the network tab shows it.
Almost certainly `Content-Type: application/json`. Only three content types avoid a preflight, and JSON is not among them. An Authorization header has the same effect. A sensible Access-Control-Max-Age removes most of the cost.
No. The value is one origin or `*`. Your server has to compare the incoming Origin against your allow-list and echo the match — which is why `Vary: Origin` matters once you do.
No. It restricts what a browser page from another origin may read. Any non-browser client — curl, a script, a server — ignores it entirely. CORS is not an access control, and an API still needs real authentication.