Last active
December 14, 2019 20:58
-
-
Save ctala/690b359a8d53309f06f780f198930c83 to your computer and use it in GitHub Desktop.
Example of Security Headers for a PHP application using .htaccess for Apache2
This file contains hidden or 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
# Extra Security Headers | |
<IfModule mod_headers.c> | |
Header set X-XSS-Protection "1; mode=block" | |
Header always append X-Frame-Options SAMEORIGIN | |
Header set X-Content-Type-Options nosniff | |
</IfModule> | |
# Solving Cookies created without HTTPOnly and Secure flag | |
php_value session.cookie_httponly 1 | |
php_value session.cookie_secure 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment