Web and API Security, lesson 2
The same-origin policy and CORS
What the browser lets one site read from another, and why.
Your browser holds sign-ins for many sites at once, and any page you open can make it send requests to any of them. The same-origin policy decides what a page may read back, CORS lets a server relax it, and cookies decide which requests arrive signed in. You need to know what a request, a header and a cookie are, from Networking Foundations' "The web and HTTP".
Part of Pro
In this lesson
- Origins, and what a page may read
- CORS: letting one origin read
- Requests another site can start
Cybersecurity comes with Pro: every lesson in every module.
Web and API Security overviewSpotted a mistake? Tell us.