I’m trying to mask the entire URI in the browser when a request returns (Crystal Reports displays the db user and password in it). I originally tried using the HTTP_RESPONSE_DATA event, but it does not seem to access the HTTP::payload variable correctly because the IRule does nothing when that event is used. When the Irule below is enabled I get a Page Cannot Be Displayed message.
when HTTP_RESPONSE {
Find URI string
set str_indices [regexp -all -indices {\?apsuser} [HTTP::payload]]
foreach str_idx $str_indices {
set str_start [lindex $str_idx 0]
set str_end [lindex $str_idx 1]
set str_len [expr {$str_end - $str_start + 1}]
HTTP::payload replace $str_start $str_end [string repeat “X” $str_len]
}
}