Bug 607138: Don't send the Strict-Transport-Security header for the

attachment_base.
r=LpSolit, a=LpSolit


git-svn-id: svn://10.0.0.236/trunk@261628 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org
2010-12-06 16:03:52 +00:00
parent d837877e46
commit 28236b4ff5
2 changed files with 7 additions and 3 deletions

View File

@@ -1 +1 @@
7611
7612

View File

@@ -275,9 +275,13 @@ sub header {
# Add Strict-Transport-Security (STS) header if this response
# is over SSL and the strict_transport_security param is turned on.
if ($self->https && Bugzilla->params->{'strict_transport_security'} ne 'off') {
if ($self->https && !$self->url_is_attachment_base
&& Bugzilla->params->{'strict_transport_security'} ne 'off')
{
my $sts_opts = 'max-age=' . MAX_STS_AGE;
if (Bugzilla->params->{'strict_transport_security'} eq 'include_subdomains') {
if (Bugzilla->params->{'strict_transport_security'}
eq 'include_subdomains')
{
$sts_opts .= '; includeSubDomains';
}
unshift(@_, '-strict_transport_security' => $sts_opts);