Skip to content

Instantly share code, notes, and snippets.

@edbentinck
Created February 15, 2020 17:51
Show Gist options
  • Save edbentinck/d241377b8fef3608f0e6bfc9db55603a to your computer and use it in GitHub Desktop.
Save edbentinck/d241377b8fef3608f0e6bfc9db55603a to your computer and use it in GitHub Desktop.
Curl request to debug CORS – grep is optional
curl -I \
-H "Origin: https://origin.domain.com" \
-H 'Access-Control-Request-Method: GET' \
https://api.domain.com/example-endpoint 2>&1 | grep 'access-control-allow-origin'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment