Forum Discussion
iRule to convert backend server response
I have a vendor web server I am able to make changes. It is set to use HTTP.
I would like to use the F5 LB infront of the application to provide https.
I have the F5 configured and a client cert installed... when I make a call to my application
https://test.domain.com it goes through the LB and the server returns http://10.10.10.10/web/guest;jsessionid=802CDB3F92D1167DBBBCC8D0CAE14782.tomcat1
How can I create an iRule that alters the response from the server to substitute the http://10.10.10.10 for https://test.domain.com ?
Thanks for assistance
1 Reply
- Vijay_E
Cirrus
Try something like this in an iRule attached to the VS:
when HTTP_RESPONSE { if { [HTTP::header values Location] contains "10.10.10.10" } { HTTP::header replace Location [string map {10.10.10.10 test.domain.com} [HTTP::header value Location]] } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com