Forum Discussion
TLL_91858
Jul 22, 2015Cirrus
specific pool member based on URI reruns causing failure
I have an iRule that runs to allow me to test a specific pool member provided I put a special word in the uri; the application is a java app, and the Java part works fine. The problem is when the application comes back to run a report, it changes the uri and the HTTP_REQUEST runs again putting me in the wrong pool. I thought the cookie would prevent this from happening, but it's not. Here's the code
when HTTP_REQUEST {
if {not [HTTP::cookie exists "admintest"]}
{
if {[string tolower [HTTP::uri]] ends_with "admin"}
{ pool Test_Pool member 192.168.2.100:80 ;
log local0. "WELCOME [HTTP::uri]" }
else {
pool TEST_Pool member 192.168.2.200:80 ;
log local0. "This is not the right place" }
}
}
when HTTP_RESPONSE {
HTTP::cookie insert name "admintest" value "IamTesting"
}
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