Always unset HSTS when sending headers in non SSL mode

(most probably useless)
This commit is contained in:
iliajie
2022-09-13 00:05:50 +03:00
parent 8fd9b20139
commit db3ade87cc

View File

@@ -972,6 +972,9 @@ $mt ||= "text/html";
if (!$gconfig{'no_strict_transport_security'} && uc($ENV{'HTTPS'}) eq "ON") {
print "Strict-Transport-Security: max-age=31536000;\n";
}
elsif (uc($ENV{'HTTPS'}) ne "ON") {
print "Strict-Transport-Security: max-age=0;\n";
}
if ($pragma_no_cache || $gconfig{'pragma_no_cache'}) {
print "pragma: no-cache\n";
print "Expires: Thu, 1 Jan 1970 00:00:00 GMT\n";