diff options
Diffstat (limited to 'Bugzilla/CGI.pm')
-rw-r--r-- | Bugzilla/CGI.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index 848f840b2..30f88bd5b 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -285,6 +285,12 @@ sub header { unshift(@_, '-cookie' => $self->{Bugzilla_cookie_list}); } + # Add Strict-Transport-Security (STS) header if this response + # is over SSL and ssl_redirect is enabled. + if ($self->https && Bugzilla->params->{'ssl_redirect'}) { + unshift(@_, '-strict-transport-security' => 'max-age=' . MAX_STS_AGE); + } + return $self->SUPER::header(@_) || ""; } |