Created
March 22, 2016 13:14
-
-
Save anonymous/83fb368e8cbb7d32c859 to your computer and use it in GitHub Desktop.
Strict-Transport-Security Header
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
<?php | |
// Raw header | |
Strict-Transport-Security: max-age=31536000 | |
// or | |
Strict-Transport-Security: max-age=31536000; includeSubDomains | |
// How to send the response header with PHP | |
header("Strict-Transport-Security: max-age=31536000"); | |
// How to send the response header with Apache (.htaccess) | |
<IfModule mod_headers.c> | |
Header set Strict-Transport-Security "max-age=31536000" | |
</IfModule> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment