Created
October 27, 2023 13:00
-
-
Save dbrugne/f1fb69e2eef22332752ec76ccecc299f to your computer and use it in GitHub Desktop.
How to test CORS headers with cURL
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:8080" \ | |
-H "Access-Control-Request-Method: POST" \ | |
-H "Access-Control-Request-Headers: X-Requested-With" \ | |
-X OPTIONS --verbose \ | |
http://localhost:8080/my/api | |
# ... | |
# < Access-Control-Allow-Origin: * | |
# < Access-Control-Allow-Methods: POST | |
# < Access-Control-Allow-Headers: X-Requested-With | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment