Forum Discussion
mikegray_198028
Cirrus
Apr 29, 2017Replace Query parameter value
Hello Team,
Is there any way to rewrite the query string while passing request to pool member.
example request to the vip
https://vip/app/launch?cmd=showIncidents&devicename=router1
request to pool
http://poolmemeber/app/launch?cmd=showIncidents&nodename=router1&newWindow=true&j_username=myuser&j_password=mypassword
Any chance on this
1 Reply
- Kevin_Davies_40
Nacreous
You can use HTTP::query command to get or set the query string. You have to extract and rebuild it yourself then feed it to that command. In your case you want to remove devicename and add other items. Here is some example code to get you started...
when HTTP_REQUEST { set newquery "cmd=[URI::query [HTTP::uri] cmd]&" switch [URI::query [HTTP::uri] devicname] { router1 { append newquery "nodename=router1&newWindow=true&j_username=myuser&j_password=mypassword" } } HTTP::query $newquery }
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects