Forum Discussion
sandiksk_35282
May 01, 2019Altostratus
irule not working as expected
Issue with an irule ,from tcpdump dont see traffic hitting the backend servers in the pool.
when RULE_INIT {
set debug 1
}
when HTTP_REQUEST {
if {$debug} {
set L...
Andy_McGrath
May 02, 2019Cumulonimbus
Cannot access a variable set in
RULE_INIT
unless it is a global (don't do it!) or a static, better to set it in CLIENT_ACCEPTED
it is minor overhead and quicker to update and apply
Some other minor changes but think the following should work for you:
when CLIENT_ACCEPTED {
set debug 1
}
when HTTP_REQUEST {
if {$debug} {
set LogString "Client [IP::client_addr]:[TCP::client_port] -> [HTTP::host][HTTP::uri]"
log local0. "============================================="
log local0. "$LogString (request)"
foreach aHeader [HTTP::header names] {
log local0. "$aHeader: [HTTP::header value $aHeader]"
}
log local0. "============================================="
}
switch -glob [HTTP::header "SOAPAction"] {
"http://www.user.com/CustomerFacingWebsite/Customer" -
"http://www.user.com/CustomerFacingWebsite/Points" -
"http://www.user.com/CustomerInquiry/Balances" {
if { [active_members qa2-pool] > 0 } {
pool qa2-pool
} else {
pool qa1-pool
}
}
}
}
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