Forum Discussion
Artur_Zdolinsk1
Historic F5 Account
This iRule can cause with some application problems with loading images like PNG which contains inside content data HTTP string. To prevent problems with missing images - you should ensure that on the beginning of HTTP_RESPONSE you first disable STREAM profile and then enable it only for text content-type. iRule should look like this:
Exemple:
when HTTP_REQUEST {
STREAM::disable
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
STREAM::disable
if { [HTTP::header exists Location] } {
HTTP::header replace Location [string map -nocase {"http://" "https://"} [HTTP::header Location]]
}
if {[HTTP::header value Content-Type] contains "text"}{
STREAM::expression {@http://@https://@}
STREAM::enable
}
}
}
Neil_66348
Dec 05, 2018Nimbostratus
"Artur Zdolinski" you are an absolute legend!!!
I was missing the STREAM::disable statement beneath the HTTP_RESPONSE and thus many images on our site were not loader properly (missing content-length headers etc). Adding this statement instantly fixed it. Thank you so much for sharing this
:)