diff options
author | Reed Loden <reed@reedloden.com> | 2010-06-25 20:12:06 -0500 |
---|---|---|
committer | Reed Loden <reed@reedloden.com> | 2010-06-25 20:12:06 -0500 |
commit | 4a85d6d1ead4cf6020148034425b7ea6de0f5899 (patch) | |
tree | 76a62bf83aa9088da952a649a6ac26b618938160 /Bugzilla/CGI.pm | |
parent | d386a4e8d5eeb9936c0d60029d5193dcf547e442 (diff) | |
download | bugs-4a85d6d1ead4cf6020148034425b7ea6de0f5899.tar bugs-4a85d6d1ead4cf6020148034425b7ea6de0f5899.tar.gz bugs-4a85d6d1ead4cf6020148034425b7ea6de0f5899.tar.bz2 bugs-4a85d6d1ead4cf6020148034425b7ea6de0f5899.tar.xz bugs-4a85d6d1ead4cf6020148034425b7ea6de0f5899.zip |
Bug 562475 - "Bugzilla should use strict-transport-security (STS) headers"
[r=mkanat a=mkanat]
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(@_) || ""; } |