Squeak
Feb 03, 2021Cirrus
Multiple stream replacements using an iRule
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
Hi Mikael,
STREAM::expression [list { @http://supportportalen-test/@http://supportportalen-test.hej.se/@ } { @http://web02/@http:/web02.hej.se/@ }]