Forum Discussion
Paulius
May 22, 2024MVP
You should copy these iRules as is.
First iRule
when HTTP_REQUEST priority 500 {
set URI [string tolower [HTTP::uri]]
if { ( [HTTP::method] == "PUT" ) } {
switch -- -glob ${URI} {
"/rws/api/v1/devices/*" -
"/rws/api/v1/accounts/*"
{
pool POOL_POD1_RWSDEVICE
}
}
} elseif { ( [HTTP::method] == "POST" ) } {
switch -- -glob ${URI} {
"/rws/api/v1/accounts/*"
{
pool POOL_POD1_RWSDEVICE
}
default
{
pool POOL_POD1_RWS
}
}
}
}
Second iRule
when HTTP_REQUEST priority 500 {
if { ( [HTTP::method] == "PUT" ) } {
switch -- -glob ${URI} {
"/x/*" -
"/y/*"
{
pool PUT_X_Y
}
}
} elseif { ( [HTTP::method] == "POST" ) } {
switch -- -glob ${URI} {
"/x/*"
{
pool POST
}
}
}
default {
pool POOL1
}
}