27-Oct-2021 06:44
All:
I am looking for a way to do ProxyPass like functionality inside an irule or other LTM module. We have an application running in Azure that we want to forward traffic to, but need to maintain our URL. Example: abc.com/login forwards to the Azure app (app1.azurewebsites.com) but the URL in the address bar maintains abc.com/login. Is there a way to achieve this? I have tried a redirect but that show the Azure URL, not our internal URL. We need to maintain our URL for proper cookie processing. Thanks.
Solved! Go to Solution.
05-Nov-2021
01:57
- last edited on
03-Apr-2023
18:11
by
JRahm
you would need to create a pool with a FQDN node of using Azure site "app1.azurewebsites.com". Assign that pool to VIP of abc.com. Add below iRule to the abc.com VIP for Host header rewrite. This should do the trick.
when HTTP_REQUEST {
HTTP::header replace "Host" "app1.azurewebsites.com"
}
when HTTP_RESPONSE {
HTTP::header replace Location [string map -nocase {app1.azurewebsites.com abc.com}
[HTTP::header Location]]
}
04-Nov-2021 16:21
Hi Brad. I'm not sure if they will help but I did find a couple resources that might.
This one is about iRule triggers for HTTP Request. In the Sample Code area (about half way down) I did see a few ProxyPass type entries. Maybe that'll get you going although I noticed earlier BIG-IP versions. https://clouddocs.f5.com/api/irules/HTTP_REQUEST.html
And, this is simply the Manual Chapter for Configuring Rewrite Profiles for Portal Access: https://techdocs.f5.com/kb/en-us/products/big-ip_apm/manuals/product/apm-portal-access-13-1-0/6.html
Again, not an expert for this but hopefully these help.
ps
05-Nov-2021
01:57
- last edited on
03-Apr-2023
18:11
by
JRahm
you would need to create a pool with a FQDN node of using Azure site "app1.azurewebsites.com". Assign that pool to VIP of abc.com. Add below iRule to the abc.com VIP for Host header rewrite. This should do the trick.
when HTTP_REQUEST {
HTTP::header replace "Host" "app1.azurewebsites.com"
}
when HTTP_RESPONSE {
HTTP::header replace Location [string map -nocase {app1.azurewebsites.com abc.com}
[HTTP::header Location]]
}
05-Nov-2021
06:05
- last edited on
24-Mar-2022
01:23
by
li-migration
Thanks so much !
05-Nov-2021
16:50
- last edited on
24-Mar-2022
01:24
by
li-migration
Hope this gets it sorted for you .
If nailed it please click Select As Best.