CORS guides for real deployments
From preflight conditions to per-server configuration, ordered the way real incidents are fixed.
- When a CORS preflight (OPTIONS) is sent, and what the browser checksThe exact conditions that make the browser send OPTIONS before the real request, the three headers it carries, and the order in which the response is checked.
- Access-Control-Allow-Origin, credentials: include and the wildcard banExact-match rules for Allow-Origin, the multiple-value error, why * is forbidden with credentials, and the three headers the rule applies to.
- Simple-request checks: method, headers and Content-TypeThe Fetch Standard safelist explained value by value, including the byte rules for header values and the Range exception.
- Vary: Origin and CDN cache poisoningHow a cache that keys on the URL alone reuses the wrong response, what it looks like in both directions, and how to set Vary: Origin on each platform.
- CORS configuration per server: Workers, Nginx, Express and ApacheThe same allowlist implemented safely on four platforms, with the pitfall each one hides — and a deployment checklist.
0 bytes of your input sent to a server (advertising and affiliate widgets excluded)