Forum Discussion

Insellj's avatar
Insellj
Icon for Altostratus rankAltostratus
Oct 17, 2023
Solved

Set Header for Pool items and return it in the Virtual IP (VIP)

Hi, We have a Virtual IP (VIP) setup which load balances requests to a pool of servers. We need to be able to add in a response header depending on which pool server responds. This is so that we can...
  • Insellj's avatar
    Oct 18, 2023

    Found a solution 😁  CA_Valli  PSFletchTheTek 

    when HTTP_RESPONSE {
    	set xserveron_header_value [class match -value [IP::server_addr] equals webfarm_headers]
    	if {$xserveron_header_value ne ""}{
    		HTTP::header insert X-Server-On $xserveron_header_value
    	}
    }