Forum Discussion
STREAM::expression takes a page reload to work....
We are having a problem with SharePoint in that it wants to use non-SSL for profile images in pages. So we have a domain collab.fakedomain.com that is grabbing profile photos, etc from my-site.fakedomain.com. The both sites are accessed via SSL for most normal users. However, is using http for user profile images in pages. I have the iRule in the code block below, but it is behaving strangely. When the page first loads it throws the "some non-secured content" dialogue. If you say no to showing the non-secured content, and look at the source code for the page it is indeed streaming back with the http url still in the page (and the image is not displayed). If at that point I refresh, it reloads right away with the images showing, and the source code shows the URL was replaced to be the SSL url.
Why would it not work on the first request? And what would change that would make it work on the second request?
when RULE_INIT {
Set this option to 1 to log debug messages (to /var/log/ltm by default)
set static::single_vs_debug 0
}
when HTTP_REQUEST {
disable for all requests
STREAM::disable
}
when HTTP_RESPONSE {
if {[HTTP::header value Content-Type] contains "html"}{
set msHttp80 "http://my-site-collab.fakedomain.com:80/User%20Photos/Profile%20Pictures/"
set msHttps443 "https://my-site-collab.fakedomain.com:443/User%20Photos/Profile%20Pictures/"
STREAM::expression "@$msHttp80@$msHttps443@"
enable for this response
STREAM::enable
}
}
when STREAM_MATCHED {
set LogString "<>"
if {$static::single_vs_debug}{
log local0. "$LogString:"
}
}
1 Reply
- Kevin_Stewart
Employee
Can you confirm that the stream replacement is actually happening? The expression is also case sensitive, so you may not be making a match.
What happens if you just shorten the expression to http:// and https://?
"@http://@https://@"
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com