Forum Discussion
myself_85560
Nimbostratus
Jun 01, 2016LB decisions matching the headers
Hi,
We have a custom written application that is being hosted on multiple servers behind the LTM. It does not use cookies rather a variety of unique http headers. I need to use these unique headers t...
- Jun 02, 2016
Hi,
I would recommend the modified irule below, changed second if by elseif. Otherwise, If you match the first if you also match the else and you will have a tcl error and a tcp reset on thz client side :
when HTTP_REQUEST { if { [class match [HTTP::header "online.protocol.remote.contenttype"] equals header_value_1] } { pool_1 } elseif { [class match [HTTP::header "online.protocol.remote.contenttype"] equals header_value_2] } { pool_2 } else { pool_3 } }
Yann_Desmarest
Cirrus
Jun 02, 2016Hi,
I would recommend the modified irule below, changed second if by elseif. Otherwise, If you match the first if you also match the else and you will have a tcl error and a tcp reset on thz client side :
when HTTP_REQUEST {
if { [class match [HTTP::header "online.protocol.remote.contenttype"] equals header_value_1] } {
pool_1
}
elseif { [class match [HTTP::header "online.protocol.remote.contenttype"] equals header_value_2] } {
pool_2
}
else {
pool_3
}
}
myself_85560
Nimbostratus
Jun 02, 2016Tahnks Yann! You are awesome!
Quick question, would this iRule work for POST methods as well. Please advise.
thanks
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