Created
March 14, 2018 11:52
-
-
Save aalfiann/ae4d74c205b35b888f7254f42ed8855a to your computer and use it in GitHub Desktop.
Example multiple ACAO in htaccess
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_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule . index.php [L] | |
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 | |
</IfModule> | |
<IfModule mod_headers.c> | |
# Example multiple Access Control Allow Origin (ACAO) | |
#SetEnvIf Origin "http(s)?://(www\.)?(google.com|staging.google.com|development.google.com|proxy1.omovv.com|server.omovv.com)$" AccessControlAllowOrigin=$0 | |
#Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin | |
# Unset Server Signature header | |
ServerSignature Off | |
# Unset Server Technology header | |
Header unset X-Powered-By | |
# Set XSS Protection header | |
Header set X-XSS-Protection "1; mode=block" | |
# Set content-sniffing protection | |
Header set X-Content-Type-Options nosniff | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment