Forum Discussion
amebiz_142234
May 25, 2018Nimbostratus
irule 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
May 25, 2018Nacreous
Cookies 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"
}
}
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