Forum Discussion
MW1
Apr 30, 2013Cirrus
Thanks for the response - I have realised my issue is the external data group does not get reloaded when the file was altered so it is matching, just not using the updated data. The F5 this is eventually destined for is running v11 so that might give me some options round this (I only have the v9.3.1 to test on currently and realise there will need to be a few tweaks to the irule for v11). Unfortunately I am looking to have this data group updated without needing support accessing the F5, so need to look for someway to detect the file has changed and perform an action to read the new data group.
when HTTP_REQUEST {
log local0. "TEST-irule request coming"
switch -glob [string tolower [HTTP::uri]] {
"/medq_esb/proxy_services*" {
Only check POST requests
if { [HTTP::method] eq "POST" } {
log local0. "TEST-irule post request"
Default amount of request payload to collect (in bytes)
set collect_length 2048
Check for a non-existent Content-Length header
if {[HTTP::header Content-Length] eq ""}{
Use default collect length of 2k for POSTs without a Content-Length header
set collect_length $collect_length
} elseif {[HTTP::header Content-Length] == 0}{
Don't try collect a payload if there isn't one
unset collect_length
log local0. "TEST-irule no content length"
} elseif {[HTTP::header Content-Length] > $collect_length}{
Use default collect length
set collect_length $collect_length
} else {
Collect the actual payload length
set collect_length [HTTP::header Content-Length]
}
If the POST Content-Length isn't 0, collect (a portion of) the payload
if {[info exists collect_length]}{
Trigger collection of the request payload
HTTP::collect $collect_length
log local0. "TEST-irule going to collect request"
}
} else
{ pool company7_osb_pool } }
"/platform-webservices/filetransferdatatransferservices*" { pool company7_filetransfer_pool }
"/webservices/company*" { pool QASAR }
"/urls/forgot-password"
{ HTTP::redirect "https://ca.company.com/utilities/psa.aspx?ACT=REQPASS" }
"/urls/forgot-username"
{ HTTP::redirect "https://ca.company.com/utilities/psa.aspx?ACT=REQUNAME" }
default
{ discard
log local0. "TEST-irule request discarded" }
}
}
when HTTP_REQUEST_DATA {
set data {
Your IP address has not been recognized.
Please contact company support.false
}
Match the data for specific companyid and is a login request
if { [HTTP::payload] contains ">123" and [HTTP::payload] contains "