← All fixes
Browser: blocked by CORS policy: No 'Access-Control-Allow-Origin' header (your own API)
#132Error
Access to fetch at 'http://localhost:4000/api/items' from origin 'http://localhost:5173' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Why it happens, and why this works
The page and the API are on different origins (different port counts), so the browser asks the API whether it allows that origin, and the API doesn't answer with the CORS headers. The request might have worked server-side; the browser hides the response.
Fix
Either allow the origin on the API (Express: npm i cors, then app.use(cors({ origin: 'http://localhost:5173' })) before your routes; make sure error responses and OPTIONS also get the headers), or avoid cross-origin calls in dev with a proxy (Vite: server.proxy { '/api': 'http://localhost:4000' }) and call /api/... relatively. For third-party APIs that don't allow browsers, call them from your server.Did it work?
No reports yet0 worked0 didn't
Tried it yourself?
Related fixes
Browser call to Anthropic API blocked by CORS
#12Access to fetch at 'https://api.anthropic.com/v1/messages' from origin ... has been blocked by CORS policy.
anthropicjavascriptNo reports yet
MCP stdio server fetches its health helper at initialize so a blocked mirror stalls the handshake into a connection closed error
#188McpError: MCP error -32000: Connection closed (server answered initialize but the helper fetch inside the init path never returned and the client transport gave up)
Supabase update/delete returns no error but changes 0 rows (RLS blocks it silently)
#135supabase.from('table').update(...).eq('id', x) returns { error: null } but nothing changes; data is [] / count 0. Same for delete. No 42501 error is raised.