Fix sslsettings in hsts for nginx

This commit is contained in:
Florian Aders
2016-10-07 19:08:32 +02:00
parent f1f7d7dd14
commit 75d8d0b397

View File

@@ -608,14 +608,14 @@ class nginx extends HttpConfigBase
}
if (isset($domain_or_ip['hsts']) && $domain_or_ip['hsts'] >= 0) {
$vhost_content .= 'add_header Strict-Transport-Security "max-age=' . $domain_or_ip['hsts'];
$sslsettings .= 'add_header Strict-Transport-Security "max-age=' . $domain_or_ip['hsts'];
if ($domain_or_ip['hsts_sub'] == 1) {
$vhost_content .= '; includeSubDomains';
$sslsettings .= '; includeSubDomains';
}
if ($domain_or_ip['hsts_preload'] == 1) {
$vhost_content .= '; preload';
$sslsettings .= '; preload';
}
$vhost_content .= '";' . "\n";
$sslsettings .= '";' . "\n";
}
}
}