Skip to main content

Same-Origin Policy

Learn Same-Origin Policy (CORS, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes Same-Origin Policy (SOP) is a browser rule: a page may freely read data only from the same origin, meaning the same scheme, host and port. Origin parts : https://shop.com:443 differs from http://shop.com (scheme), https://api.shop.com (host) and https://shop.com:8443 (port). Why it exists : without it a malicious site could read your bank page using your logged-in cookies.

More lessons in CORS