Thiyagu
May 22, 2024Cirrus
Need help with an iRule for HTTP Methods
Could you please review the below iRule and suggest?
when HTTP_REQUEST {
if { ( [HTTP::method] equals "PUT" ) } {
switch -glob [string tolower [HTTP::uri]] {
"/rws/api/v1/devices/*" -
"/rws/api/v1/accounts/*" {
pool POOL_POD1_RWSDEVICE
}
}
}
else
{ ( [HTTP::method] equals "POST" ) } {
switch -glob [string tolower [HTTP::uri]] {
"/rws/api/v1/accounts/*" {
pool POOL_POD1_RWSDEVICE
}
default {
pool POOL_POD1_RWS
}
}
}
}