Forum Discussion
spalande
Nacreous
Jul 31, 2013Need help on i-rule
Need an i-rule to modify the payload of http for receiving traffic from client cloud to the internal server. payload should be modified in such a way that, internal server should send notification (r...
spalande
Nacreous
Aug 14, 2013when HTTP_REQUEST { set lent [HTTP::header Content-Length] log local0.info "Content-length $lent" HTTP::collect $lent log local0.info "Collected" }
when HTTP_REQUEST_DATA { log local0.info "Request data..."
Get ELB domain from data group already configured
set val [class match -value "Cloud_ELB_Domain" contains PAM_Config]
set cloudUrl "https://$val"
set val1 [class match -value "Notification_Server" contains PAM_Config]
set replaceUrl "http://$val1"
log local0.info "To replace $cloudUrl with $replaceUrl"
if { [HTTP::payload] contains $static::cloudUrl} {
log local0.info "Payload matches"
set newPLoad [string map [list $static::cloudUrl $replaceUrl] [HTTP::payload]]
HTTP::payload replace 0 [string length $newPLoad ] $newPLoad
log local0.info "Payload modified"
}
HTTP::release
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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