Created
August 10, 2012 19:33
-
-
Save elcuervo/3317243 to your computer and use it in GitHub Desktop.
Nginx CORS config
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
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
add_header 'Access-Control-Allow-Methods' 'POST, OPTIONS'; | |
add_header 'Access-Control-Max-Age' '1728000'; | |
add_header 'Content-Type' 'text/plain; charset=UTF-8'; | |
return 200; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment