Last active
September 14, 2016 15:28
-
-
Save gaetancollaud/014c20ad48e9db5782bbc47506166634 to your computer and use it in GitHub Desktop.
CrossOrigin
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
#BEGIN TELCRED | |
SetEnvIf Origin "^http(s)?://(.+\.)?(telcred\.net|localhost)(:\d+)$" origin_is=$0 | |
Header always set Access-Control-Allow-Origin %{origin_is}e env=origin_is | |
Header always set Access-Control-Allow-Credentials %{origin_is}e env=origin_is | |
Header always set Access-Control-Allow-Headers "Authorization,Content-Type" env=origin_is | |
Header always set Access-Control-Request-Method "GET,POST,OPTIONS" env=origin_is | |
#END TELCRED | |
RewriteCond %{REQUEST_METHOD} !OPTIONS | |
a2enmod allowmethods | |
apachectl -t | |
service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment