Forum Discussion
amebiz_142234
Nimbostratus
May 25, 2018irule pool selection based on dynamic cookie value
Hi, my scenario: i want to select a pool based on a cookie value - that works as aspected when_HTTP_REQUEST {
if { [HTTP::cookie exists "myCookie"] } {
switch -glob [HTTP::cookie value "myCook...
Lee_Sutcliffe
Nacreous
May 25, 2018Cookies are set using the following syntax:
HTTP::cookie insert name value [path ] [domain ] [version <0 | 1 | 2>]
I've updated your iRule, please give it a try and let me know how you get on
when_HTTP_REQUEST {
if { [string tolower [HTTP::uri]] equals "/foo/" } {
HTTP::cookie insert name "myCookie" value "foo"
}
if { [string tolower [HTTP::uri]] equals "/bar/" } {
HTTP::cookie insert name "myCookie" value "bar"
}
}
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
