Created
June 3, 2014 16:14
-
-
Save conrad-vanl/e0f9ceaf95976421b25a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Access-Control-Allow-Origin: * | |
Access-Control-Request-Headers: Authorization | |
Access-Control-Allow-Methods: GET, POST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 theAccess-Control-Allow-Method
(so if PUT and DELETE are also used I'll needAccess-Control-Allow-Methods: GET, POST, PUT, DELETE