$ ./guess_the_languageCybersecurity
Cybersecurity · hard · #312

How does a browser treat a credentialed cross-origin fetch receiving these headers?

Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
  1. It reads the response normally
  2. It blocks the response from script
  3. It strips cookies, then allows it
  4. 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 ▸