iRule to take host information from absoluteURI and re-write the host header
Hi all,
We have a VIP which is being accessed by clients externally via different proxies. We noticed that some of those proxies manipulate the host header of the HTTP request and re-write it with the wrong information. Those GET requests are absoluteURIs like one below. We want to take the host information from the absoluteURI and re-write the host header of the HTTP request using iRule so specific content can be accessed. Unfortunately iRule needs to be generic as there are different proxies with different dns domains. Did you guys have seen iRule which can achieve described result?
Example of HTTP request
GET https://client1.test.com/path/query?test=A
Host: proxy.domain.net
X-Forwarder-host : proxy.domain.net
Example of HTTP request after modification
GET https://client1.test.com/path/query?test=A
Host: client1.test.com
X-Forwarder-host : proxy.domain.net
Thanks, Michal