Forum Discussion
Tom_Kilday_9259
Nimbostratus
Jan 29, 2009How to remove mixed content for https site
Looking for an Easy way. Remove the insecure javascript that points to the
watermark.gif
Script to remove
I tried this but it doesn't work
when HTTP_REQUEST {
set newuri "img/icon.offsite.gif"
set newhost "www.law.harvard.edu"
if { [HTTP::host] contains "www.google.com" and [HTTP::uri] contains "coop/cse/brand?form=cse-search-box&lang=en"}
{
HTTP::redirect "http://[HTTP::$newhost][HTTP::$newuri]"
}
}
thanks
-Tom
- Colin_Walker_12Historic F5 AccountIf you're looking to remove a string from within the HTTP payload itself, then your best bet is the stream profile. You won't be able to just perform a redirect as it doesn't look like you're dealing with host or URI information, really, but with the content being delivered by a server that is in turn pointing you to an insecure location to load some javascript.
- Tom_Kilday_9259
Nimbostratus
I am just trying to remove this one line - hoolio
Cirrostratus
If you want to replace a string within the request or response payload, you can use a blank stream profile and a STREAM::expression based iRule. Set the string to replace as your string with the regex metacharacters escaped. Make sure to check the STREAM::expression wiki page (Click here) for details.when HTTP_RESPONSE { Disable the stream filter by default STREAM::disable Check if response type is text if {[HTTP::header value Content-Type] contains "text"}{ Replace google search form with nothing STREAM::expression {@@@} Enable the stream filter for this response only STREAM::enable } }
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects