Created
July 29, 2014 10:24
-
-
Save otobrglez/500866a4a3f2cd817e13 to your computer and use it in GitHub Desktop.
How to test if your CORS configuration works?
This file contains 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
#!/usr/bin/env bash | |
# Target host: http://aioo-api.dev | |
# Testing from origin: http://aioo-spa.dev | |
# Method: "POST" | |
curl --verbose --request OPTIONS http://aioo-api.dev \ | |
--header 'Origin: http://aioo-spa.dev' \ | |
--header 'Access-Control-Request-Headers: Origin, Accept, Content-Type' \ | |
--header 'Access-Control-Request-Method: POST' | |
# Use, share, collaborate. ;) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment