Explain CORS error code
Paste a CORS error and the server code behind it and Vibe explains what the browser blocked and why: which origin asked, which header was missing, and the fix, which goes on the server, not in the browser.
Up to 1,500 characters (about 60 lines). Your code is sent to Unvibe and Anthropic to write the explanation. Don't paste keys or passwords. Common key formats are refused.
Vibe18 lines selected
Press Explain it for the sample, or paste your own code first.
What this CORS error sample shows
- origins
- An origin is the scheme, host and port together.
http://localhost:5173andhttp://localhost:3000differ only in the port, and that is enough to make them different origins, so the browser treats the API as another origin and applies CORS. - the missing header
- The request did reach the API: the server logged
GET /api/todosand answered 200. The browser then kept the reply from the page because it had noAccess-Control-Allow-Originheader, andfetchthrewTypeError: Failed to fetch. A request sent from outside the browser, with the sameOriginheader, got the JSON back. - the fix
- Adding
"Access-Control-Allow-Origin": "http://localhost:5173"to the reply's headers made the same fetch work.*worked too, but it lets pages from any origin read the reply. A value naming another origin,http://localhost:3000, failed withhas a value 'http://localhost:3000' that is not equal to the supplied origin. - preflight
- An
Authorizationheader made the browser ask first: it sentOPTIONS /api/todos, which this server answered with 404 and no Allow-Origin, and stopped withResponse to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present, without sending the GET. AnsweringOPTIONSwith 204, Allow-Origin andAccess-Control-Allow-Headers: Authorizationlet the GET through, and the todos came back.
Good to know
- Run with Node 25.7.0 and Chromium 156, driven by Playwright. The 2 console lines in the sample are what Chromium logged; the page's own
catchprintedTypeError Failed to fetch. mode: 'no-cors'doesn't fix it. The request went out and the server answered 200, but the page got an empty response with status 0, andres.json()failed withUnexpected end of input.
Watch out: CORS doesn't protect your API. It decides what pages from other origins, in a browser, can do with a reply: the plain GET reached the server and got its 200 even when the page couldn't read the answer, and a request from outside a browser read the todos although the reply had no Access-Control-Allow-Origin header. Keep real checks, such as who is signed in, on the server.
Explain CORS error code beside your editor
Unvibe is a free app for Mac and Windows. In the app there is no pasting: select code in any app and press Control+U (Ctrl+Alt+U on Windows).
Install on Mac
curl -fsSL https://unvibe.site/install.sh | bashPaste into Terminal. Unvibe isn't notarized by Apple yet, so this is the smooth path.
Or download the .dmg · Intel Mac build · SHA-256 checksums
Opening the .dmg the first time
- Open the .dmg and drag Unvibe to Applications.
- Open it once; macOS says it can't verify it. Click Done.

Real screen, macOS 15 - System Settings › Privacy & Security › Open Anyway. Confirm, then enter your Mac password. The button shows for about an hour after you try to open Unvibe.

Real screen, macOS 15
The Terminal line checks the download against the published SHA-256 and Unvibe's self-signed signature before it installs anything. More help with the first open