Why do we redirect the host header during the time of request in policy/irule ?
- 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