Forum Discussion
Chris1269_13050
Nimbostratus
Aug 05, 2015How to filter within iRule for HTTP_RESPONSE
Hi all,
Is there anyway we can use an iRule to filter a HTTP_RESPONSE with whats in the HTTP header or something like that? We current use a filter like:
when HTTP_RESPONSE { if {[LB::server pool...
Kevin_Stewart
Employee
Aug 05, 2015Well, there might be a few ways to do this.
-
If you can modify the application(s) to throw in some specific response header or maybe metatag, you can filter on that in the response.
-
In most cases the HTTP request and response are an atomic pair, so:
when HTTP_REQUEST { set flag "" if { something } { set flag "true" } elseif { something_else } { set flag "false" } } when HTTP_RESPONSE { if { [info exist flag] } { switch $flag { "true" { do something } "false" { do something_else } } } }
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
