Created
July 24, 2018 12:42
-
-
Save osahner/b8aa7129d4e3819385cba3b79ddc93f6 to your computer and use it in GitHub Desktop.
CORS Apache dynamic Access-Control-Allow-Origin
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
<Directory "****"> | |
SetEnvIf Origin "^http(s)?://.+$" AccessControlAllowOrigin=$0 | |
Header always set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin | |
Header always set Access-Control-Allow-Credentials true env=AccessControlAllowOrigin | |
Header always set Access-Control-Allow-Methods "HEAD, POST, GET, OPTIONS, DELETE, PUT" | |
Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token" | |
</Directory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment