Forum Discussion
DannyG
Nov 02, 2017Nimbostratus
Thanks for the help in advance!
The datagroup will be string and be formated like hostname:poolname
when HTTP_REQUEST {
test_dg is a string data-group where the entries are name:value pairs
name is the requested HTTP host header, value is the associated pool-name
check the requested HTTP host header against entries in data-group
if { [class match [string tolower [HTTP::host]] equals test_dg ] } {
if the HTTP host header is in datagroup
send the request to the pool associated with the datagroup entry
pool [class match -value [string tolower [HTTP::host]] equals test_dg ]
} else {
drop the request if the host header is not in datagroup
drop
}
}