# What does 'No 'Access-Control-Allow-Origin' header is present on the requested resource' mean?

**Short answer:** The browser blocked your frontend from reading an API response because the server didn't send `Access-Control-Allow-Origin` for your site's origin. Fix it on the API server by allowing your exact origin(s). Don't use a browser extension, a public CORS proxy, or a blanket `*` on endpoints that use cookies.

*Last updated 2026-11-25 · Reviewed by ProofForge*

## The exact error

```text
Access to fetch at 'https://api.example.com/data' from origin 'https://app.example.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
```

## Why it happens

- The API has no CORS configuration, or it doesn't list your production domain (works on localhost, fails live).
- The preflight `OPTIONS` request returns an error (404/401/500), so no CORS headers are sent.
- You're calling a third-party API directly from the browser that's meant to be called from a server, often with a secret key.

## How to fix it

1. Add your exact origins to the API's allowlist and answer preflight requests:
2. If it's a third-party API that needs a secret key, call it from your own server route instead and keep the key there.

```js
// Express
import cors from 'cors'
app.use(cors({
  origin: ['https://app.example.com'],
  credentials: true
}))
```

## Check it's fixed

In DevTools → Network, the response has `access-control-allow-origin: https://app.example.com`. A request with `Origin: https://evil.example` doesn't get that header.

> **Scan box (use the site's ScanBox component):** Check whether your live app has this problem. Paste your URL for a free outside-in scan covering exposed keys, open database rules, CORS and security headers. [Scan my app free →](https://proofforge.live/#scan)

## FAQ

### Why does it work in Postman and curl?
CORS is enforced by browsers only. It controls which websites may read the response in a user's browser.

### Can I just send `Access-Control-Allow-Origin: *`?
Only for truly public, cookie-less data. With credentials it isn't allowed, and reflecting any origin lets any site read your users' data.

### Is a CORS proxy OK?
Not for production. It routes your users' requests through someone else's server.

## Sources

- [MDN: CORS header 'Access-Control-Allow-Origin' missing](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS/Errors/CORSMissingAllowOrigin)
- [MDN: Cross-Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS)

## Related

- [Fix: CORS wildcard](/fix/cors-wildcard)
- [CORS checker](/tools/cors-checker)
- [Fix CORS error: wildcard '*' with credentials 'include'](/errors/cors-wildcard-with-credentials)
- [All errors](/errors)
