Last active
April 8, 2016 09:04
-
-
Save ricksportel/6af5542c80e6783a32f5250ad8e9f578 to your computer and use it in GitHub Desktop.
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 | |
//* Add the code snippet below to your WordPress child theme's functions.php | |
add_action( 'send_headers', 'child_themename_strict_transport_security_header' ); | |
/** | |
* Enables the HTTP Strict Transport Security (HSTS) header. | |
* | |
* @since 1.0.0 | |
*/ | |
function child_themename_strict_transport_security_header() { | |
header( 'Strict-Transport-Security: max-age=10886400; includeSubDomains; preload' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code snippet is used at:
https://wphostingblog.nl/
Article(s):
https://wphostingblog.nl/wordpress-website-sneller-maken/