Bug 680771 - Send X-XSS-Protection header for XSS prevention/blocking

[r=mkanat a=LpSolit]


git-svn-id: svn://10.0.0.236/trunk@263093 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org
2011-11-21 22:31:20 +00:00
parent 6d82a471be
commit 436efca340
2 changed files with 5 additions and 1 deletions

View File

@@ -1 +1 @@
8009
8010

View File

@@ -306,6 +306,10 @@ sub header {
unshift(@_, '-x_frame_options' => 'SAMEORIGIN');
}
# Add X-XSS-Protection header to prevent simple XSS attacks
# and enforce the blocking (rather than the rewriting) mode.
unshift(@_, '-x_xss_protection' => '1; mode=block');
return $self->SUPER::header(@_) || "";
}