Step-by-step diagnostic recipes to test and simulate CORS preflight OPTIONS requests using cURL and Chrome DevTools Network inspection.
Frequently Asked Questions
Q1. Why does cURL not show a CORS error when my browser does?
cURL is an HTTP client, not a web browser. It does not enforce the browser Same-Origin Policy. To test CORS with cURL, you must explicitly simulate browser headers using -H "Origin: ..." and inspect the returned Access-Control- headers.