Forum Discussion
Lee_Sutcliffe
Nacreous
Oct 17, 2017You had an incorrect quotation mark at the end of your header type in the IF statement. This was preventing the close braces from working correctly.
I've corrected the code:
when HTTP_RESPONSE {
if {!([HTTP::header exists "X-Content-Type-Options" ])} {
HTTP::header insert "X-Content-Type-Options" "'nosniff'"
}
if {!([ HTTP::header exists "X-XSS-Protection"])} {
HTTP::header insert "X-XSS-Protection" "1; mode=block"
}
}