Skip to content

Instantly share code, notes, and snippets.

@conrad-vanl
Created June 3, 2014 16:14
Show Gist options
  • Save conrad-vanl/e0f9ceaf95976421b25a to your computer and use it in GitHub Desktop.
Save conrad-vanl/e0f9ceaf95976421b25a to your computer and use it in GitHub Desktop.
curl -H "Origin: http://localhost" \
-H "Access-Control-Request-Method: GET" \
-H "Access-Control-Request-Headers: Authorization" \
-X OPTIONS --verbose \
https://api.knod.com/example-endpoint
Access-Control-Allow-Origin: *
Access-Control-Request-Headers: Authorization
Access-Control-Allow-Methods: GET, POST
@conrad-vanl
Copy link
Author

Basically I'll need Access-Control-Request-Headers: Authorization because it looks like auth tokens are sent in this header, and I'll need whatever HTTP methods are supported in the Access-Control-Allow-Method (so if PUT and DELETE are also used I'll need Access-Control-Allow-Methods: GET, POST, PUT, DELETE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment