cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple stream replacements using an iRule

Squeak
Cirrus
Cirrus

Hi,

I´ve an Irule that scans for two expressions, supportportalen-test and web02 and adds a full FQDN instead of the shortname.

 

when HTTP_REQUEST {    # Explicitly disable the stream profile for each request so it doesn’t stay    # enabled for subsequent HTTP requests on the same TCP connection.    STREAM::disable    HTTP::header remove "Accept-Encoding" }   when HTTP_RESPONSE {    # Apply stream profile against text responses from the application    if { [HTTP::header value Content-Type] contains "text"} {           STREAM::expression {@http://supportportalen-test/@http://supportportalen-test.hej.se/@@http://web02/@http:/web02.hej.se/@}         # Enable the stream profile       STREAM::enable   } }

 

My issue are that the Irule only adds the full FQDN on supportportalen-test but not on web02.

I found this https://devcentral.f5.com/s/articles/ltm-stream-profile-multiple-replacements--regular-expressions the syntax on the stream expression in the link seems to be correct but it still not works.

 

Any takes?

 

//Mikael

1 ACCEPTED SOLUTION

Hi Mikael,

STREAM::expression [list { @http://supportportalen-test/@http://supportportalen-test.hej.se/@ } { @http://web02/@http:/web02.hej.se/@ }]

https://clouddocs.f5.com/api/irules/STREAM__expression.html

View solution in original post

2 REPLIES 2

Hi Mikael,

STREAM::expression [list { @http://supportportalen-test/@http://supportportalen-test.hej.se/@ } { @http://web02/@http:/web02.hej.se/@ }]

https://clouddocs.f5.com/api/irules/STREAM__expression.html

Hi,

 

Yes, your code worked with a slight modification. I had to remove the spaces between

"{ @" and "@ }"

 

From your link.

Note that the stream-expression string must not begin or end with blank space. Erroneous spaces will not provoke error messages but will prevent matching any data.

But thanks for your help.

 

//Mikael