Engrain by ByteRush

WEB.14 2 concepts · 2 ready

Networking III: origins, CORS and cookies across sites

Explain the same-origin policy and CORS precisely.

  1. WEB.14.01Same-origin policy, sites and originsCoreMid-level10 min
  2. WEB.14.02CORS in depthCoreMid-level12 min

Interview questions in this module

  1. What is the same-origin policy?
  2. What is CORS and what triggers a preflight request?
  3. Why does my request work in Postman/curl but fail in the browser?
  4. Why can't you use Access-Control-Allow-Origin: * with cookies?
  5. What is the difference between same-origin and same-site?