Forum Discussion
SergioG_133218
Nimbostratus
Sep 12, 2014How to select pool based on http payload ...
Dears
I want to know if posible to follow ... The developers guys send via http to f5 some data ,this guys want to f5 select the pool based on http payload .
For example ...
Address: h...
SergioG_133218
Nimbostratus
Oct 21, 2014Guys
Thanks for all. After few test I use ..
when HTTP_REQUEST { if { ([HTTP::method] eq "POST") } { HTTP::collect [HTTP::header Content-Length] } }
when HTTP_REQUEST_DATA { set decoded [decode_uri [HTTP::payload]] log local0. "=== Decoded $decoded"
set ini [string first "\"idBiller\"" $decoded]
if { $ini != -1 } {
set end [string first "," $decoded $ini]
set value [string range $decoded $ini [expr {$end-1}]]
set idBiller [lindex [split $value ":"] 1]
log local0. "=== ID Biller: $idBiller ==="
switch -exact $idBiller {
94950004 {
pool Pool_recarga_XXX
log local0. "=== Sali por TASA ==="
}
default {
pool Pool_recarga_YYY
log local0. "=== Sali por Default ==="
}
}
}
}
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
