Forum Discussion
Chris_Miller
Mar 19, 2013Altostratus
Something like this perhaps?
when HTTP_RESPONSE {
set host "www.example.com"
STREAM::disable
if { [HTTP::header is_redirect] } {
HTTP::header replace Location [string map {"http://example_isa.company.com" "https://example.company.com"} [HTTP::header value Location]] }
if {[HTTP::header value Content-Type] contains "text"}{
if { $encoding_header contains "charset=utf-8" } {
set slash "\u002f"
} else {
set slash "/"
}
STREAM::expression {@http://example.company.com@https://example.company.com@ @http://example.company.com@https://example.company.com@ "@http:$slash$slash@https:$slash$slash$host@" }
STREAM::enable }}
when STREAM_MATCHED {
log local0. "matched: [STREAM::match]"}