fix hsts settings for lighttpd, fixes #1677

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-11-22 08:16:35 +01:00
parent 192e00c717
commit 9838ff4da5

View File

@@ -531,14 +531,14 @@ class lighttpd extends HttpConfigBase
if ($domain['hsts'] >= 0) {
$vhost_content .= '$HTTP["scheme"] == "https" { setenv.add-response-header = ( "Strict-Transport-Security" => "max-age=' . $domain['hsts'];
$ssl_settings .= '$HTTP["scheme"] == "https" { setenv.add-response-header = ( "Strict-Transport-Security" => "max-age=' . $domain['hsts'];
if ($domain['hsts_sub'] == 1) {
$vhost_content .= '; includeSubDomains';
$ssl_settings .= '; includeSubDomains';
}
if ($domain['hsts_preload'] == 1) {
$vhost_content .= '; preload';
$ssl_settings .= '; preload';
}
$vhost_content .= '") }' . "\n";
$ssl_settings .= '") }' . "\n";
}
}
}