Top Nav

Test CORS with curl

Is your CDN returning the proper CORS headers? One way to test is with curl. Here’s a simple CORS request:

You should get a successful response that includes and “Access-Control-Allow-Origin” header.

And here’s a pre-flight request:

You should get a successful response that includes and “Access-Control-Allow-Origin”, “Access-Control-Allow-Methods”, and “Access-Control-Allow-Headers” headers.