We need to add below irules/policy for google cloud reverse proxy:
1. The application will drop a cookie on the first request of https://abc.site.com
2. The LTM needs to detect this cookie when it intercepts the request. based on the cookie the request needs to be reverse proxy to a google cloud URL without changing the actual application URL.
Sanjay, actually https://def.site.com/home is external url, so we don’t have any pool internally. Can I just remove only the pool part from the above iRule to forward to an external url ? Or is there any other condition to add ?
To forward to that destination without modifying a original URL, you need to add the pool or node.
I understand, you might not have a pool currently, but you would need to create a pool with the site IP address and enable routing (if needed) and open FW.
Alternatively, you can just send a redirect to a client to that external URL, but it would change the URL and your requirement is to keep the original URL intact in the browser if I understand it correctly.
Do you have any issues with iRule for option#1? Once you open the connectivity from F5 to external site on port 443, it should work. If you got any specific issues let us know.
In case you want to go ahead with option#2 of issuing a redirect to client. Below would be the iRule.
The First iRule you provided pretty match with our requirement except the pool pointing, which I believe difficult to solve by enabling routing, I’ll try to look at the routing part and firewall and see if that possible to fix, which I meant more complex not your iRule and thank you for the redirect iRule as well.
Yes, I’ll definitely let you know the outcome, most probably we will try this coming week or next.