Home

Awesome

Learning CORS

Just one of the things I'm learning. https://github.com/hchiam/learning

Tutorial

Set CORS on a server: https://web.dev/cross-origin-resource-sharing

How CORS works

https://web.dev/cross-origin-resource-sharing/#how-does-cors-work

browser sends Origin -> server responds with Access-Control-Allow-Origin -> browser (dis)allows response data to client site

Demo

https://glitch.com/edit/#!/cors-demo-hchiam?path=server.js

https://cors-demo-hchiam.glitch.me/

Other notes

https://web.dev/cross-origin-resource-sharing/#share-credentials-with-cors

https://web.dev/cross-origin-resource-sharing/#preflight-requests-for-complex-http-calls