Last active
August 6, 2019 17:05
-
-
Save ipmb/f4a09441d4320708c905bf7a7f8db272 to your computer and use it in GitHub Desktop.
Add CORS headers for domains matching a regex in uWSGI
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
# Add CORS header for Origin's which match a regexp | |
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin#Examples | |
route-if = regexp:${HTTP_ORIGIN};^.*\.example\.com$ addheader:Access-Control-Allow-Origin: ${HTTP_ORIGIN} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment