-
-
Save bmurtagh/f4d4d90b5782102a05fc to your computer and use it in GitHub Desktop.
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
# | |
# Minimal CORS config for nginx | |
# | |
# A modification of https://gist.github.com/alexjs/4165271 | |
# | |
# NB: This relies on the use of the 'Origin' HTTP Header. | |
location /static { | |
if ($http_origin ~* (whitelist\.address\.one|whitelist\.address\.two)$) { | |
add_header Access-Control-Allow-Origin "$http_origin"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment