Skip to content

Instantly share code, notes, and snippets.

@musaid
Forked from skounis/cors-test.sh
Created January 12, 2018 12:18
Show Gist options
  • Save musaid/7c52b646976e6ef4d6c1bfcd8e901692 to your computer and use it in GitHub Desktop.
Save musaid/7c52b646976e6ef4d6c1bfcd8e901692 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