How does a browser treat a credentialed cross-origin fetch receiving these headers?
Access-Control-Allow-Origin: * Access-Control-Allow-Credentials: true
- It reads the response normally
- It blocks the response from script
- It strips cookies, then allows it
- It retries the fetch without credentials
The CORS spec forbids the * wildcard when credentials are allowed; the server must echo a specific origin. Servers that reflect any Origin to dodge this create a real hole.
Play Cybersecurity ▸