visual2008_3086
Oct 17, 2017Nimbostratus
HTTP header X-XSS-Protection, X-Content-Type-Options issue
I am trying to insert the HTTP header X-XSS-Protection, X-Content-Type-Options in order to mitigate a security vunerability. I have found an irule solution, but when I implemented the solution, a code error appears.Can anyone share the correct syntax for this please? 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" } }
01070151:3: Rule [/OHSBC/Ohsbc] error: /OHSBC/Ohsbc:17: error: [parse error: PARSE missingQuote 515 {missing "}][{ !([ HTTP::header exists "X-Content-Type-Options“ ])}] /OHSBC/Ohsbc:18: error: [parse error: PARSE missingQuote 645 {missing "}][{ !([ HTTP::header exists "X-XSS-Protection“ ])}]