Add HSTS preload flag
-
// HSTS if (is_ssl()){ $time = esc_attr(get_option('security_headers_hsts_time')); $subdomain = esc_attr(get_option('security_headers_hsts_subdomains')); $preload = esc_attr(get_option('security_headers_hsts_preload')); if ( ctype_digit($time) ) { $subdomain_output = $subdomain > 0 ? "; includeSubDomains" : ""; $preload_output = $preload > 0 ? "; preload" : ""; header("Strict-Transport-Security: max-age=$time $subdomain_output $preload_output"); } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Add HSTS preload flag’ is closed to new replies.