Bug 594990: Make the Strict-Transport-Security HTTP header only be sent

if a particular parameter is enabled.
r=glob, a=mkanat


git-svn-id: svn://10.0.0.236/trunk@261289 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org
2010-09-28 03:32:33 +00:00
parent ce588cf342
commit dd4e3e53f2
4 changed files with 24 additions and 3 deletions

View File

@@ -275,8 +275,8 @@ sub header {
}
# Add Strict-Transport-Security (STS) header if this response
# is over SSL and ssl_redirect is enabled.
if ($self->https && Bugzilla->params->{'ssl_redirect'}) {
# is over SSL and the strict_transport_security param is turned on.
if ($self->https && Bugzilla->params->{'strict_transport_security'}) {
unshift(@_, '-strict-transport-security' => 'max-age=' . MAX_STS_AGE);
}