webzod
account

Drop credentials or the wildcard from CORS

headers.cors.wildcard_credentials · effort: minutes

Why it matters

Browsers refuse Access-Control-Allow-Origin * together with Access-Control-Allow-Credentials true, so the setup does not do what was intended. Public resources need no credentials, and private ones need a fixed list of origins.

The fix

  1. If the response is public and needs no cookies, remove Access-Control-Allow-Credentials.
  2. If other sites must read it with cookies, replace the wildcard with an exact allow-list of origins (see the fix for origin reflection with credentials). Do not switch to echoing the request's Origin.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.