CORS Policy & Preflight Headers Generator
Describe the request your browser makes, see whether it triggers an OPTIONS preflight, and copy the exact Access-Control-* headers your backend must return.
Generated response headers
Drop-in configuration
Why does my request send an OPTIONS preflight at all?
Browsers skip the preflight only for "simple" requests: method GET, HEAD or POST, only CORS-safelisted headers, and a Content-Type of text/plain, application/x-www-form-urlencoded or multipart/form-data. Anything else — a JSON body, an Authorization header, PUT/DELETE — forces an OPTIONS round-trip first, and that OPTIONS response must itself carry the Access-Control-Allow-* headers.
Can I use Access-Control-Allow-Origin: * with cookies?
No. With credentials, browsers reject a wildcard origin. The server must echo the exact requesting origin, send Access-Control-Allow-Credentials: true, and add Vary: Origin so shared caches never serve one site's response to another.