Forum Discussion
Kevin_Stewart
Nov 11, 2013Employee
I would just add that a good rule of thumb, whenever accepting input from the client, is to normalize that input before trying to evaluate it. For string values, I'd use the [string tolower ] function and make sure the values in your data group are also lower case.
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::host]] contains PROXY_VM] } {
pool PROXY_VM
} elseif { [class match [string tolower [HTTP::host]] contains GSI_LIST] } {
pool GSI_PROXY
} elseif { [class match [IP::client_addr] equals INTERNAL_IPLIST] } {
pool PROXY_VM
} else {
pool PROXY_POOL
}
}