CORS: The Complete Handbook for Modern Web APIs

CORS: The Complete Handbook for Modern Web APIs Cross-Origin Resource Sharing, or CORS, is one of the most misunderstood parts of web development. Teams lose hours to it because the browser error messages feel vague, framework defaults vary wildly, and many blog posts reduce the topic to “just add Access-Control-Allow-Origin: *”. That advice is often wrong. CORS is not an authentication system, not a CSRF defense, and not a server-to-server access control mechanism. It is a browser-enforced policy layer that decides whether frontend JavaScript running on one origin may read a response from another origin. ...

March 29, 2026 · 26 min · headertest.com

CORS for Payment Gateway Integrations: Pros, Cons, Patterns

Payment integrations are where sloppy CORS decisions turn into outages, failed checkouts, or security reviews nobody wants to sit through. I’ve seen teams assume CORS is just a browser checkbox: add Access-Control-Allow-Origin: *, ship it, done. That logic falls apart fast in payments. Gateways deal with tokens, client secrets, redirects, idempotency keys, fraud signals, and sometimes session cookies. The browser is the least trustworthy place in that chain, so your CORS policy has to reflect that. ...

November 9, 2026 · 7 min · headertest.com

Shopware API CORS Mistakes and How to Fix Them

If you’re wiring a frontend to the Shopware API and the browser starts yelling about CORS, the problem usually isn’t Shopware itself. It’s the config around it: reverse proxies, app servers, auth headers, cookies, and preflight handling. I’ve seen teams lose hours on this because the API works fine in Postman, curl, or the Shopware admin, but fails instantly in the browser. That gap is the whole CORS story: browsers enforce it, backend clients don’t. ...

November 4, 2026 · 7 min · headertest.com

CORS for gRPC-Web: Pros, Cons, and Practical Tradeoffs

gRPC-Web looks simple on the surface: your browser app makes RPC calls, your backend answers, everybody wins. Then CORS shows up and turns a clean protocol choice into a deployment problem. I’ve hit this enough times to have a strong opinion: CORS for gRPC-Web is less about “turning on cross-origin access” and more about choosing where protocol translation and policy enforcement should live. That choice affects debugging, security posture, local development, and whether your frontend team hates you by Friday. ...

October 25, 2026 · 6 min · headertest.com

CORS Mistakes with AWS Lambda Function URLs

AWS Lambda Function URLs are one of those features that feel almost suspiciously easy. Click a checkbox, get a public HTTPS endpoint, ship it. Then the browser starts yelling about CORS. I’ve seen this catch people because Function URLs blur two layers together: AWS can add CORS headers for you at the Function URL level. Your Lambda code can also return CORS headers. Mix those carelessly and you get flaky behavior, broken preflights, and confusing browser errors that look unrelated to the actual bug. ...

October 21, 2026 · 7 min · headertest.com

CORS Case Study: same-site vs same-origin confusion

A lot of CORS bugs are not really CORS bugs. They’re architecture bugs caused by mixing up same-origin and same-site, then trying to patch the fallout with headers until the browser stops complaining. I’ve seen this play out the same way more than once: frontend on app.example.com API on api.example.com session cookie involved somebody says “it’s the same domain, so it should work” someone else adds Access-Control-Allow-Origin: * auth breaks, or worse, security assumptions break Here’s a real-world style case study that shows how teams end up here, what the browser is actually doing, and what the fix looks like. ...

October 16, 2026 · 7 min · headertest.com

CORS for HTTP/3: Pros, Cons, and What Changes

CORS does not magically change because your API moved from HTTP/1.1 or HTTP/2 to HTTP/3. The policy model is the same. The headers are the same. The browser still decides whether frontend JavaScript can read the response. What does change is the transport underneath: QUIC instead of TCP, different connection behavior, different performance characteristics, and a few deployment surprises that show up right next to your CORS config. That distinction matters. I’ve seen teams expect HTTP/3 to “fix” flaky CORS behavior because requests feel different in DevTools. It won’t. If your Access-Control-Allow-Origin policy is wrong, it stays wrong at any HTTP version. ...

October 5, 2026 · 7 min · headertest.com

CORS and Auth Tokens: JWT vs Cookies

CORS gets messy the moment authentication enters the picture. A simple public GET with Access-Control-Allow-Origin: * is easy. GitHub’s API does exactly that for many responses: access-control-allow-origin: * access-control-expose-headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset, Warning That works because a browser can fetch public data without credentials. The moment you send cookies or an Authorization header, the rules change. ...

October 4, 2026 · 6 min · headertest.com

CORS for BigCommerce API: What Works and What Doesn't

If you try to call the BigCommerce REST Management API directly from browser JavaScript, you’re going to hit a wall. Not because your fetch() code is wrong, but because CORS is doing exactly what it’s supposed to do. BigCommerce has multiple API surfaces, and they do not behave the same way from a browser. That distinction matters: Storefront APIs are designed for browser-facing use cases Management APIs are meant for trusted server-side access CORS policy decides whether the browser will even allow your frontend code to read the response That’s the part people usually miss. The request may leave the browser just fine, but if the response doesn’t include the right CORS headers, your app still fails. ...

September 29, 2026 · 7 min · headertest.com

CORS for Render Deployments: Practical Setup and Fixes

CORS on Render usually fails for boring reasons: the wrong origin, missing preflight handling, or a preview URL you forgot to allow. If you deploy APIs or frontends on Render, you’ll hit this fast. Your frontend lives at one origin, your API at another, and the browser blocks requests unless the API sends the right Access-Control-* headers. Render itself doesn’t “do CORS” for your app. Your service has to return the headers. That’s the part many people miss. ...

September 19, 2026 · 7 min · headertest.com