Forum Discussion
Invoke another loadbalancer url from current loadbalancer url using irule
Hi All,
I have developed the code for the following use case. I have used the HTTP:URI to call the cookiegenerator.html,
but i need to call diffrent loadbalacer url(http://xmppt.airservices.eds.com:8080/TestBasicAuth/cookiegenerator.html) to call
from the current loadbalancer url( http://xmppwst.airservices.eds.com/OAuthDemo/finalusers.html).
Instead of HTTP:uri, what should i use to call cookiegenerator.html and return back to current loadbalacer url(finalusers.html)
Also please validate the code and let me know for any correction.
when CLIENT_ACCEPTED { log local0. "enter client_accepted" set cookie 1 set gotpath 1 }
when HTTP_REQUEST { log local0. "enter http_request: gotpath=$gotpath" if { $gotpath == 1 } { HTTP::uri /OAuthDemo/cookiegenerator.html set gotpath 0 } }
when HTTP_RESPONSE { log local0. "http_response: cookie=$cookie; status=[HTTP::status]; sm=[HTTP::cookie exists "SMSESSION"]" if { [HTTP::cookie exists "SMSESSION"] } { set smsession "SMSESSION=[HTTP::cookie value SMSESSION]" }
if { [HTTP::status] == 200} { if { $cookie == 1 } { HTTP::header insert "Set-Cookie" "$smsession" set cookie 0 } } }
Regards, Praque
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