Forum Discussion
danjerman_19651
Nimbostratus
Sep 28, 2009Pool level header insert or cookie persistence via iRule?
Hi,
I have a v4 config that is rule based..
i.e. if condition a then use pool pool_a elseif condition b use pool pool_b
pool pool_a {
header insert ...
The_Bhattman
Nimbostratus
Sep 28, 2009Hi DM,
The following example is v9 iRule of something that may be close what you are looking for:
when HTTP_REQUEST {
if {[HTTP::uri] eq "/blah" } {
HTTP::header insert "ClientIPAddress" [IP::client_addr]
pool poolA
} elseif{ [HTTP::uri] eq "/blahblah" } {
persist cookie insert "Blah_poolb_Cookie" "0d 00:30:00"
pool poolB
}
}
or via the SWITCH command
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/blah" {
HTTP::header insert "ClientIPAddress" [IP::client_addr]
pool poolA
}
"/blahBlah" {
persist cookie insert "Blah_poolb_Cookie" "0d 00:30:00"
pool poolB
}
}
}
I hope this helps
CB
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
