Last updated: April 29, 2026
Same-Origin Policy is the bedrock of web security. But “origin” has nuances: scheme matters, port matters, path doesn’t. Subdomains aren’t same-origin (they’re same-site, different concept).
CORS is opt-in cross-origin. It carries credentials only with explicit allow. Access-Control-Allow-Origin: * with credentials is invalid. Many implementations get this wrong.
postMessage crosses origins by design. Receiver must validate event.origin — many don’t. Cross-origin XSS via lazy postMessage handlers is common.
The mindset: trace every cross-origin path explicitly. Each is a trust boundary.
Module Quiz · 3 questions
Pass with 80%+ to mark this module complete. Unlimited retries. Each question shows an explanation.
Custom team training + practitioner advisory
Beyond the free academy — we run private workshops, vCISO advisory, and red-team exercises tailored to your stack. For Indian SMBs scaling past their first hire.