hi@all,
i try to replace a part of a header value with STREAM
In the response, i get a 302 back. in this 302er I want to replace the protocol.
Example:
Location: http://www.myserver.com/dynamic-data0815
-->
Location: https://www.myserver.com/dynamic-data0815
My iRule:
--------------------
when HTTP_RESPONSE {
Need to explicitly disable the stream profile by default so it doesn’t stay
enabled for subsequent HTTP requests on the same TCP connection.
STREAM::disable
Apply stream profile against text responses from the application
if { [HTTP::header value Content-Type] contains “text” }{
Look for http:// and replace it with https://
STREAM::expression {@http://@https://@}
Enable the stream profile
STREAM::enable
}
}
This section only logs matches, and should be removed before using the rule in production.
when STREAM_MATCHED {
log local0. “Matched: [STREAM::match]”
}
-------------------------
This works fine for all “http” in the body, but not for the header ![]()
Version: BIG-IP 10.1.0 Build 3341.0 Final
Thanks for hints
bjoern