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