Interview Prep/Networking/HTTP, TLS & Certificates

What is CORS and who enforces it?

IntermediateConceptHTTP, TLS & Certificates
Answer

Cross-Origin Resource Sharing is a browser mechanism. A page on one origin calling another origin's API needs Access-Control-Allow-Origin (and others) in the response; for non-simple requests the browser first sends an OPTIONS preflight.

It is not a server-side security control: curl ignores it. Do not reflect arbitrary Origin values with credentials enabled.

All Networking questions Roadmap: Networking for DevOps

More on HTTP, TLS & Certificates