Forum Discussion
Thomas_Greco_11
Nimbostratus
Jun 23, 2006Mask URI
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]
}
}
- Deb_Allen_18Historic F5 AccountThe approach you've taken above would require that you issue an HTTP::collect command in HTTP_RESPONSE to begin collecting the payload, then use HTTP::payload command in HTTP_RESPONSE_DATA to evaluate what has been collected. (search for HTTP::collect in this forum for examples.)
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