Forum Discussion
Portal with problem Mixed content http and https
Hi everbody,
I have one environment with WebLogic Server, this WebLogic server has some appplications. It's applications through the conext root, example: test.com/app1 test.com/app2
We are implementing SSL offload, but not work very well. So, I've two VIP's port 80 and port 443, the last with SSL certificate.
On the port 80 I use the follow irule:
when HTTP_REQUEST { HTTP::redirect https://[HTTP::host][HTTP::uri] }
On the port 443, follow irule:
when HTTP_REQUEST { switch [string tolower [HTTP::host]] {
test.com { if { [HTTP::uri] equals "/" } {
HTTP::redirect "http://[HTTP::host]/app1/"
} else { pool pool_app1 }
}
test.com { if { [HTTP::uri] equals "/" } {
HTTP::redirect "http://[HTTP::host]/app2/"
} else { pool pool_app2 }
}
test.com { if { [HTTP::uri] equals "/" } {
HTTP::redirect "http://[HTTP::host]/app3/"
} else { pool pool_app3 }
}
}
}
When I'm acessing the application on browser, I can see this warning:
Mixed Content: The page at 'https://test.com/app1/login.jsp;jsessionid=FQLOIiQginJKvjdq5wj3etGT0PWnSMlicp7jfX9ACiypZoy6gt_A!-925239242' was loaded over HTTPS, but requested an insecure image 'http://test.com/app1/icon.png'. This content should also be served over HTTPS.
Follow more evidencies:
Please specialists, how to fix it?
1 Reply
- Chris_Grant
Employee
Try using the _sys_https_redirect irule that is built into the BigIP. It is written specifically to do http to https redirection. In 11.6.0 it looks like this:
when HTTP_REQUEST { HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri] }Also, your test conditions in your switch statement are identical and you have no default. This is probably not what you want.
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