VIBE⌇BRATOR
Take the Vibe Check
Error explained

CORS error

No 'Access-Control-Allow-Origin' header is present on the requested resource

The browser blocked your page from reading another site's response, because that site did not allow your site to read it.

What it means

Your page asked a different origin (another domain, port or protocol) for data. The response did not carry an Access-Control-Allow-Origin header allowing your site, so the browser will not let your code read it.

This check is done by the browser. Tools such as curl do not do it, which is why the same request can work in a terminal and fail on your page.

Common causes

A prompt to fix it

Paste it into your AI coding tool and fill in the parts in angle brackets. It asks the tool to find the cause and show you before it changes anything.

Paste it, then fill in the <angle brackets>
My browser console shows: Access to fetch at '<the URL>' from origin '<my site>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

First tell me which case this is:
A. The URL is my own backend or API, and I can change its code or settings.
B. The URL is someone else's API.

If A: send the Access-Control-Allow-Origin header from that server for my site's origin only. Not *, unless the data is public and no cookies or credentials are sent. If more than one origin needs access and you echo the request's Origin, check it against a list and also send Vary: Origin.
If B: do not try to fix it in the browser. Move the request to my own server (an API route or server function) and have my page call that instead. Keep any API key on the server.

Do not switch to mode: 'no-cors' if my code needs to read the response: it makes the response unreadable. Do not suggest a browser extension.

How to check it is fixed

Tested prompts that help

Sources

Everything above comes from these pages. We read them on September 27, 2026; if one has changed since, it wins.