Forum Discussion

Shripaty's avatar
Icon for Cirrus rankCirrus
Oct 11, 2021

Redirect based on HTTP Header values to specific pool member

Hi ,


I have a scenario , where I want to redirect the traffic coming and identify the specific header named trust which has certain specific number , these numbers are in around 100 quantities which will be specific to calls generated from specific devices.


Point here I want to create a if rule to match the header value to a list of datagroup which contains the trust id and match accordingly and then redirect the traffic to certain pool.


Can this certain pattern be automated by declaring a regex parameter to randomly create the pools by replacing hostname for each trustid value ex





if { [HTTP::header] exists "TRUST" } {


set trustnum [findstr [HTTP::header] value "trust"] 


foreach $trustnum {


if { ( [HTTP::header $trustnum] equals "trustnumberdatagroup" ) ne "" } {


pool { regex [trustnumberdatagroup] }





}else {








Pool can be automated to use fqdn with reference from trust header value in the hostname part.

pool trustnumber-https {


member {


fqdn === where trustnum1 is replaced by the trust value 





No RepliesBe the first to reply