Last active
June 13, 2017 08:20
-
-
Save kid/99f91c8a22cab5b2ed8d6c790c9e8095 to your computer and use it in GitHub Desktop.
nginx...
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 / { | |
expires $expires; | |
if ($cors = "simple") { | |
add_header "Access-Control-Allow-Origin" "$http_origin"; | |
} | |
if ($cors = "preflight") { | |
add_header "Access-Control-Allow-Origin" "$http_origin"; | |
add_header "Access-Control-Allow-Methods" "GET, HEAD, POST, OPTIONS"; | |
add_header "Access-Control-Allow-Headers" "Cache-Control"; | |
return 204; | |
} | |
try_files $uri /index.html; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment