Skip to content

Instantly share code, notes, and snippets.

@carlohcs
Forked from THEtheChad/.htaccess
Created June 21, 2016 03:50
Show Gist options
  • Save carlohcs/ccc530c9b76adf42ac2494a0d6b10bf7 to your computer and use it in GitHub Desktop.
Save carlohcs/ccc530c9b76adf42ac2494a0d6b10bf7 to your computer and use it in GitHub Desktop.
Access-Control-Allow-Origin for Subdomains
SetEnvIf Origin "^(.*\.example\.com)$" ORIGIN_SUB_DOMAIN=$1
Header set Access-Control-Allow-Origin "%{ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment