added X-XSS-Protection header
This commit is contained in:
@ -46,6 +46,9 @@ public class OwaspStandardFilter implements Filter {
|
|||||||
HttpServletResponse res = (HttpServletResponse) response;
|
HttpServletResponse res = (HttpServletResponse) response;
|
||||||
// X-FRAME-OPTIONS: Clickjacking protection: "deny" - no rendering within a frame, "sameorigin" - no rendering if origin mismatch
|
// X-FRAME-OPTIONS: Clickjacking protection: "deny" - no rendering within a frame, "sameorigin" - no rendering if origin mismatch
|
||||||
res.addHeader("X-FRAME-OPTIONS", mode);
|
res.addHeader("X-FRAME-OPTIONS", mode);
|
||||||
|
|
||||||
|
// Ensure that the web browser's XSS filter is enabled, by setting the X-XSS-Protection HTTP response header to '1'.
|
||||||
|
res.addHeader("X-XSS-Protection", "1");
|
||||||
|
|
||||||
// X-Content-Type-Options the only defined value, "nosniff",
|
// X-Content-Type-Options the only defined value, "nosniff",
|
||||||
// The only defined value, "nosniff", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type.
|
// The only defined value, "nosniff", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type.
|
||||||
|
|||||||
Reference in New Issue
Block a user