Forum Discussion
amebiz_142234
Nimbostratus
May 23, 2018irule pool selection based on cookie value
Hi,
Cookie value:
LocaleInformation:COUNTRYHAWKCODE%3DAT%7CJAVACOUNTRYCODE%3DAT%7CUSERSHOPLANGUAGE%3Dde%7C
LocaleInformation:COUNTRYHAWKCODE%3DAT%7CJAVACOUNTRYCODE%3DBE%7CUSERSHOPLANGUAGE%3Dfr%7C
i want to choose the pool based on a part in the cookie value
pseudo code
if cookie value include JAVACOUNTRYCODE%3DBE%7
pool AAA
elseif cookie value include JAVACOUNTRYCODE%3DAT%7
pool BBB
i think it is better to use a switch -glob but i'm not sure is that possible? any ideas? thanks 4 your help
- youssef1
Cumulonimbus
Hi,
you can already try this:
when HTTP_REQUEST { if { [HTTP::cookie exists "LocaleInformation"] and [HTTP::cookie value "LocaleInformation"] contains "JAVACOUNTRYCODE%3DBE%7" }{ pool AAA } elseif { [HTTP::cookie exists "LocaleInformation"] and [HTTP::cookie value "LocaleInformation"] contains "JAVACOUNTRYCODE%3DAT%7" }{ pool BBB } else { pool default } }
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