Forum Discussion
Lee_Sutcliffe
Oct 17, 2017Nacreous
You 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"
}
}