Skip to content

Instantly share code, notes, and snippets.

@graudeejs
Forked from skounis/cors-test.sh
Created March 26, 2018 07:26
Show Gist options
  • Save graudeejs/23db17c19d422790cc9bff7afea8f13f to your computer and use it in GitHub Desktop.
Save graudeejs/23db17c19d422790cc9bff7afea8f13f 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