Forum Discussion
Greg_Donohoe_25
Nimbostratus
Oct 16, 2015HTTP header insert
I am trying to insert the HTTP header "X-Frame-Options: SAMEORIGIN" in order to mitigate a security vunerability. Can anyone share the correct syntax for this please?
Stanislas_Piro2
Cumulonimbus
Oct 16, 2015try this:
when HTTP_REQUEST {
if { !([HTTP::header exists X-Frame-Options"])} {
HTTP::header insert "X-Frame-Options" "SAMEORIGIN"
} elseif {!([HTTP::header Origin] equals "SAMEORIGIN") } {
HTTP::header replace "X-Frame-Options" "SAMEORIGIN"
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects