irule for allowing mixed content

One of our websites protected by SSL (SSL certificate is installed on our BIG-IP LTM ) contains reference links (pictures, menu bars)to http.

When someone is hitting the web site using IE8, http gets redirected to https (I have an irule for that) but is getting a warning message “do you want to view only the webpage content that was delivered securely?”

Is it any way to create an irule to allow mixed content so the browser would not show the warning?

The irule I use for http redirection is:

when HTTP_REQUEST {

HTTP::redirect https://[HTTP::host][HTTP::uri]

}

Thank you all for help

Sorin

Hi Sorin,

I haven’t found any way on an iRule - more or less I fixed the mixed content that was being displayed OR adjusted my browser not to warn me about mixed content.

CB

Adjusting the browser was not an option. I have found a solution by using a customized stream profile. Read this solution posted on support web site

Thanks, S.

Hi Sorin,

Make sure to explicitly disable the stream filter if the response type isn’t text. This is something that SOL8115 doesn’t show, but should.

when HTTP_RESPONSE { 
    if { [HTTP::header Content-Type] starts_with "text/" }{ 
       STREAM::expression "@abc@123@" 
       STREAM::enable 
    } else { 
       STREAM::disable 
    } 
 }

Also, if the string you’re replacing is a different length than the replacement string, you’ll need to create a custom HTTP profile with response chunking set to rechunk. This gets around a mismatch in content length as chunked responses don’t use a content length header.

Aaron

Hi, can you please share our solution. I am facing the same situation. main app run son https, within main app there is iFrame which supposed to direct user to another app which runs on http. e.g https://mainapp.domain.com iframe within main app is http://subapp.domain.com.

I used iRule to redirect user to subapp: if https://mainapp.domain.com/subapp --> http://subapp.domain.com.

I get mixed contents error from browser when loading iFrame. if I change browser setting, it load with no issue but that is not an option.

thank you in advance.