CORS HTTP Origin: Network OSI layer 7 · Application Last updated 18 Nov 2026

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.

Exact message you may see 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
Seen on: HTTP Browser Nginx

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_header without always mismatch
  • Two CORS libraries enabled

⚡ Quick fix

  1. Add CORS headers in one place only
  2. Reflect the single matching origin
  3. Remove duplicate add_header/middleware

Detailed fix by platform

cURL

  1. curl -sI -H "Origin: https://app.example.com" https://api.example.com/ | grep -i access-control

How to diagnose

  1. Header count — More than one?
  2. Layers — App and proxy?
  3. 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:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

400 — 400 Bad Request: Request Header Or Cookie Too Large (HTTP)400400 — 400 Bad Request: invalid character in header (HTTP)400401 — 401 Unauthorized without WWW-Authenticate header (HTTP)401axios — Axios "Network Error" with no response (CORS, DNS, offline or mixed content) (HTTP)axiosCORS — CORS Error: No 'Access-Control-Allow-Origin' header is present (API)CORSCORS — CORS: Request header field is not allowed by Access-Control-Allow-Headers in preflight response (HTTP)CORSCORS — CORS: wildcard '*' not allowed when the request's credentials mode is 'include' (HTTP)CORSCORS on errors — CORS error hides the real failure: Access-Control-Allow-Origin is missing on 4xx/5xx responses (HTTP)CORS on errorsCORS

Explore the map of this error Full error map →

🧠 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.