The scan result says "CORS" while the API and the page work fine, and it is hard to see what the problem is. For this article I measured the CORS settings of my own site and confirmed that nothing needed changing.
The short answer: CORS is the setting that decides which sites' JavaScript may read this response. * means "anyone may read it", and echoing the caller's name back is close to "everyone is allowed". If the response carries a signed-in visitor's data, name the sites you allow.
What CORS is
Picture a members-only shop. A sign at the door says either "members only" or "open to everyone", and that changes which customers get in. CORS (Cross-Origin Resource Sharing) is how a server puts up that sign. What the sign decides, though, is not who may enter; it is which sites' JavaScript may read the response.
An "origin" is the combination of scheme (https), host (example.com), and port, as in https://example.com. https://shop.example.com and https://api.example.com are different origins.
When JavaScript from another origin tries to read a response, the browser checks the Access-Control-Allow-Origin header the server returned. Without permission, the response arrives but is not passed to the JavaScript.
Why it concerns you
AI-built apps often separate the page and the API onto different origins. The page sits on Netlify and the API on Supabase or Cloudflare Workers, for example. That setup needs CORS settings on the API side.
The official pages are here.
- Netlify's official site (English)
- Supabase's official site (English)
- Cloudflare Workers' official documentation (English)
If you forget the settings, the page stops working, so people sometimes open it up with * before launch. That is the trap. * means every site's JavaScript may read it, not just yours.
The impact is largest when the request carries a signed-in visitor's cookie (or a token stored in one). If another site can read your API's response with that visitor's authority, personal data walks out the door.
"*" and "echoing the Origin back" are different
CORS settings fall into four broad states.
| What the server returns | Who can read it | What to watch |
| --- | --- | --- |
| no header | the same origin only | cannot serve as a cross-origin API |
| Access-Control-Allow-Origin: * | every site | cannot be read by requests that send cookies |
| only the origins you chose | the sites on your allow-list | this is the baseline |
| the request's Origin, echoed back | every site that asks | the same as having no allow-list |
* is fine for data anyone may read, such as weather or exchange rates. The problem appears when it is combined with login information.
Even if you return * together with Access-Control-Allow-Credentials: true (the instruction that a response may be read with credentials), browsers do not accept that combination for requests that send cookies. It is still detected as a sign of misconfiguration.
The bigger risk is echoing the request's Origin back. That is the same as "anyone who asks is allowed". Combined with Allow-Credentials: true and a cookie setting that lets cookies go to other sites (SameSite=None; Secure, for example), any site can read the response with the visitor's cookies.
How it looks in vuln
vuln (a free check for a public URL) shows CORS as one row, V14.
- V14 CORS (reference) (area: Headers, priority 1)
V14 sends a single GET — the kind of request a browser makes when it opens the top page — with Origin: https://example.com, and looks at the response headers. It sends no extra requests and no preflight (an OPTIONS question).
There are two judgments.
Access-Control-Allow-Origin: *andAccess-Control-Allow-Credentials: trueare both present: Check (info)- the
Originit sent is echoed back: Check (severity low). WithAllow-Credentials: trueas well, Needs work (severity medium)
V14 has priority 1 (reference). It looks only at the top page's HTML, not at API responses. A pass does not mean the API is safe.
A measurement from our own site
On 30 November 2026 I checked the response headers with curl -sS -D - -o /dev/null -H 'Origin: https://example.com' https://ismyappok.com, and with the same command for https://ismyappok.com/ja. Both returned HTTP/2 200, and neither returned access-control-allow-origin or vary.
This site serves its pages and API from the same origin and has no API that other origins read. So having no CORS headers is correct, and V14 passes. There is no reason to add them.
If your API lives on another origin, on the other hand, returning nothing means the page cannot read it. The order is to name the sites you allow, not to reach for * because it "does not work otherwise".
How to fix it
The baseline is to return only the origins that really call the API. The detailed steps for each item are on CORS settings. The official steps are here.
- MDN's official CORS documentation (English)
- MDN's official Access-Control-Allow-Origin documentation (English)
- OWASP's Secure Headers Project (English)
If you return the headers yourself, for example on Cloudflare Workers, check the request against an allow-list first. Do not echo Origin back without checking it.
``js
const allowed = new Set(["https://example.com"]);
const origin = request.headers.get("Origin");
const headers = new Headers();
if (origin && allowed.has(origin)) {
headers.set("Access-Control-Allow-Origin", origin);
headers.set("Access-Control-Allow-Credentials", "true");
headers.set("Vary", "Origin");
}
``
Vary: Origin tells a CDN (a cache site that serves many visitors) or another cache that the response changes with the Origin. Without it, the permission header meant for one site can be returned to another.
Limit the methods and headers too, to the ones you need. Narrowing Access-Control-Allow-Methods: * or Access-Control-Allow-Headers: * later is late. Narrow them from the start.
After changing the settings, run vuln and look at the V14 row. V14 only sees the top page's response, though. Check the API's CORS by looking at the API's response headers directly.
What CORS does not protect
CORS is a way to ask the browser not to hand over a response. It does not stop requests from reaching the server.
A simple request (one that sends no cookies and uses a fixed form) still reaches the server without CORS permission. So setting CORS alone does not prevent CSRF (another site making a signed-in visitor act). Authentication and permission checks still happen on the API side.
CORS headers are also for browsers. They do nothing for curl or server-to-server traffic. What protects an API is authentication, authorization, and input validation.
Even with a V14 pass, whether the API's authentication and authorization are right still has to be checked separately.
Wrapping up
Start by running vuln and looking at the V14 row. If it shows no * and no reflected Origin, the work in this article is not needed. If it does, drop *, add an allow-list and Vary: Origin. That is enough to start.
The fixes are collected on these pages.
You can also check display and links before launch with audit (no login).
This article is based on checking our own site's responses. We did not scan anyone else's site for it. The numbers are implementation conditions; the only measurements are the ones with the date and method given in the text.