LBadinger_33194
Feb 21, 2018Nimbostratus
iRule Switch Statement default pool
Trying to understand how this irule should behave when it hits the "default' option on the "switch" statement. When the "pool $default_pool" is called what is the behaviour of the pool statements that follow in the "if then" statement? Does it override the previous pool statement?
when CLIENT_ACCEPTED {
set default_pool prod_default3_pool
set inbound_temp_pool prod_temp3_pool
}
when HTTP_REQUEST
{
switch -glob [string tolower [HTTP::uri]]
{
"/foo*"
{
drop
}
"/bar*"
{
pool bar_pool
persist cookie insert "barsession" "1d 00:00:00"
}
}
default
{
pool $default_pool
if { [HTTP::cookie exists "TEMP"] }
{
pool $inbound_temp_pool
}
else
{
}
}