pedinopa_170325
Aug 25, 2017Nimbostratus
x-frame-options
I have had to do multiple irules to set different x-frame-options. So I have multiple irules setting x-frame-options, I want to write 1 irule that will pick the appropriate x-frame-option based on the host name that is returned. I have been working on the irule below but it doesnt seem to insert the header and causes my site not to be accessible when applied to the VS. The sites are SSL so can I not check the HTTP::host should I be grabbing the host another way?
when HTTP_REQUEST { set host [string tolower [HTTP::host]]
}
when HTTP_RESPONSE { if {[$host eq ";]} { HTTP::header insert X-Frame-Options "ALLOW-FROM ;
} else { HTTP::header replace X-Frame-Options "DENY" }
}