For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Siddiqui_182827's avatar
Siddiqui_182827
Icon for Nimbostratus rankNimbostratus
May 24, 2015

Stream Profile ::: header / data manipulation

Can anyone , please help me understanding the how the below stream profile is working with irule .

I want to implement it in live environment , where BigIp LTM 10.2.X should rewrite location header in first response it receive from the server .

I found the below irule from dev site but facing trouble in understanding the function , how it is working .

when HTTP_REQUEST { tell server not to compress response HTTP::header remove Accept-Encoding

 disable STREAM for request flow
STREAM::disable

} when HTTP_RESPONSE { catch and replace redirect headers if { [HTTP::header exists Location] } { HTTP::header replace Location [string map {"http://" "https://"} [HTTP::header Location]] }

 only look at text data
if { [HTTP::header Content-Type] contains "text" } {

     create a STREAM expression to replace any http:// with https://
    STREAM::expression {@http://@https://@}

     enable STREAM
    STREAM::enable
}

}

1 Reply