Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add CORS headers for domains matching a regex in uWSGI
# 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
You can’t perform that action at this time.