Forum Discussion

Blue_whale's avatar
Blue_whale
Icon for Cirrocumulus rankCirrocumulus
Dec 14, 2022
Solved

Why do we redirect the host header during the time of request in policy/irule ?

Hi team ,   I need your help in understanding the below policy configured to redirect the host header during the time of request . 1.Why do we need to replace the host header? What is the need of t...
  • Kai_Wilke's avatar
    Dec 14, 2022

    Hi Sarovani,

    the Local Traffic Policy Rule replaces the (external) Host-Header "ppd-rrr-api.example.com" with an the (internal) value of "ppd-kfg.example.com" and then forwards the request to the pool "/Common/p_ppd.kgf.example.com"

    The Local Traffic Policy is most likely deployed because your internal API system wont respond to the external name. The rule and action is performing a simple rewrite of the HTTP request to make your server happy and the application work.

    On a site note: The Action sets a variable while its performing the HOST-Header replacement. This approach is probably not "best practise" and may become replaced with the action below...

    Warning: You may double check if subsequent Local Traffic Policies or iRules making use of the "$host" variable which is set by your original Local Traffic Policy. 

    Cheers, Kai