Last active
August 29, 2015 14:02
-
-
Save asiletto/6708d173d16943708b37 to your computer and use it in GitHub Desktop.
enable CORS on drupal 7
This file contains 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
<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