Remediation Steps
Follow the steps below to remediate this finding on WordPress.
Add the following to your theme's functions.php:
add_action('send_headers', function() { header('Strict-Transport-Security: max-age=31536000; includeSubDomains; preload'); });Alternatively, if using Apache, add to .htaccess:
<IfModule mod_headers.c> Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" </IfModule>