Skip to content

Instantly share code, notes, and snippets.

@skounis
Created February 12, 2016 13:38
Show Gist options
  • Save skounis/d299f3cdac81cb9eca85 to your computer and use it in GitHub Desktop.
Save skounis/d299f3cdac81cb9eca85 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