Forum Discussion
bmeyer06_204838
Jun 02, 2015Nimbostratus
iRule - Header Replace Blacklist
I'm trying to the X-Frame-Options header replace for a website, however some of the pages on the site require that setting to NOT be set. So I'm trying to create a black list of pages and this is wha...
Michael_Jenkins
Jun 02, 2015Cirrostratus
I think this would work, though for performance sake I would do it a little differently (and your strings are mixed case when you're trying to compare on lowecase)...
when HTTP_REQUEST {
set host [string tolower [HTTP::uri]
}
when HTTP_RESPONSE {
switch -glob $host {
"*notthissubfolder11*" -
"*notthissubfolder12*" -
"*notthissubfolder13*" {
Do nothing
}
default {
Replace the header value
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