Skip to content

Instantly share code, notes, and snippets.

@shawnbot
Created August 3, 2013 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawnbot/6144454 to your computer and use it in GitHub Desktop.
Save shawnbot/6144454 to your computer and use it in GitHub Desktop.
Test pre-flight CORS headers
hostname=http://example.com
url=http://cors-enabled-server.com/path/to/data.json
curl -H "Origin: ${hostname}" -X OPTIONS -H "Access-Control-Request-Method: GET" -I "${url}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment