Forum Discussion
Greg_Donohoe_25
Oct 16, 2015Nimbostratus
HTTP 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
Oct 16, 2015Cumulonimbus
try 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"
}
}
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