Skip to content

Instantly share code, notes, and snippets.

@asiletto asiletto/htaccess
Last active Aug 29, 2015

Embed
What would you like to do?
enable CORS on drupal 7
<IfModule mod_headers.c>
#CORS
SetEnvIf Origin "^http(s)?://(.+\.)?(siletto\.it|localhost|localhost2)$" DYN_ORIGIN=$0
Header set Access-Control-Allow-Origin %{DYN_ORIGIN}e
Header set Access-Control-Allow-Methods "GET, PUT, POST, OPTIONS"
Header set Access-Control-Allow-Credentials true
Header set Access-Control-Allow-Headers "Authorization, Origin, Content-Type, X-CSRF-Token"
...
...
</IfModule>
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.