Skip to content

Instantly share code, notes, and snippets.

@stafot
Forked from skounis/cors-test.sh
Created December 11, 2017 11:48
Show Gist options
  • Save stafot/bb98333db7d644bec306d2b1d70b7e7c to your computer and use it in GitHub Desktop.
Save stafot/bb98333db7d644bec306d2b1d70b7e7c to your computer and use it in GitHub Desktop.
Test CORS headers with curl
#!/bin/bash
curl -X GET -H "Origin: http://example.com" --verbose http://foo.com/bar
curl -X POST -H "Origin: http://example.com" --verbose http://foo.com/bar
curl -X PUT -H "Origin: http://example.com" --verbose http://foo.com/bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment