Forum Discussion
Tony_Hobson_189
May 15, 2015Nimbostratus
Hello
Your suggestion was spot-on. Many thanks.
If anyone needs an example, here is what we used:
when HTTP_RESPONSE {
Set DEBUG
set DEBUG 0
if { [HTTP::is_redirect] }{
if { $DEBUG } { log local0. "*** REQUEST REDIRECT BEFORE *** STATUS:[HTTP::status] LOCATION:[HTTP::header Location]" }
HTTP::header replace Location [string map -nocase { "http://" "https://" } [ HTTP::header Location] ]
if { $DEBUG } { log local0. "*** REQUEST REDIRECT AFTER *** STATUS:[HTTP::status] LOCATION:[HTTP::header Location]" }
}
Check response type is text
if {[HTTP::header value Content-Type] contains "text"}{
STREAM::expression {@http://@https://@}
Enable the stream filter for this response only
STREAM::enable
}
}