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

aandreyy_293459's avatar
aandreyy_293459
Icon for Nimbostratus rankNimbostratus
Oct 10, 2017

stream iRule not working with reg

hi

i have stream iRule that change all http to https:

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" } {

     Replace http:// with https:// UNLESS the original string is http://www.w3.org
    STREAM::expression {@http//@https://@}

     enable STREAM
    STREAM::enable
}
}

and need bypass url not changing to https, but when i am adding something like STREAM::expression {@http:(?!//@} I am getting

can't compile regular expression - (http:(?:?!//))

have any ideas how to do it in other way?

No RepliesBe the first to reply