Skip to content

Instantly share code, notes, and snippets.

@douglasmiranda
Created June 18, 2012 17:45
Show Gist options
  • Save douglasmiranda/2949648 to your computer and use it in GitHub Desktop.
Save douglasmiranda/2949648 to your computer and use it in GitHub Desktop.
Apache: When we make a Ajax request and get something like: "Origin http://ANY_DOMAIN_HERE is not allowed by Access-Control-Allow-Origin..."
SetEnvIf Origin "^http(s)?://(.+\.)?(http://ANY_DOMAIN_HERE\.com)$" origin_is=$0
Header always set Access-Control-Allow-Origin %{origin_is}e env=origin_is
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment