CORS: The 'Access-Control-Allow-Origin' header contains multiple values
The response carries the CORS header twice (or a comma-separated list), which browsers reject.
The 'Access-Control-Allow-Origin' header contains multiple valuescontains multiple values '*, *' but only one is allowedAccess-Control-Allow-Origin multiple valuesCORS header has multiple values Meaning
Both the app and the proxy/CDN add Access-Control-Allow-Origin, or a list of origins was put in one header. A response may contain exactly one value: choose the origin dynamically from an allow-list, and add CORS headers in one layer only.
Common causes
- App and nginx/CDN both adding CORS headers
- Comma-separated origin list in the header
- Duplicate headers from middleware
- Reverse proxy
add_headerwithoutalwaysmismatch - Two CORS libraries enabled
⚡ Quick fix
- Add CORS headers in one place only
- Reflect the single matching origin
- Remove duplicate
add_header/middleware
Detailed fix by platform
cURL
curl -sI -H "Origin: https://app.example.com" https://api.example.com/ | grep -i access-control
How to diagnose
- Header count — More than one?
- Layers — App and proxy?
- Value — Single origin?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in HTTP
Other ways to find it
Where this error sits
Origin: Network. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 18 Nov 2026