Not published yet
Blocked by CORS Is Not Your Code’s Fault
The same URL works in curl but your fetch gets a red line — because the browser blocks the response, it doesn’t fail the request. What that means, and the two honest fixes.
Publishing tomorrow morning · November 23, 2026
You’ve edited your fetch three times and ‘blocked by CORS policy’ won’t budge, even though the URL works fine in curl. That’s the tell: the request succeeded and the browser refused to hand the answer to your page, so no fetch edit can fix it. This builds a six-line fake API to watch a response arrive with no permission slip, defines what an ‘origin’ actually is, and gives you the two honest moves depending on one question — do you own the API? — including a dozen-line local proxy for when you don’t.