Forum Discussion
XMLHttpRequest error with HTTP to HTTPS redirect rule
Hi
So Im redirecting our HTTP traffic to HTTPS on the F5 with an Irule.
The problem is that the browsers are saying there's an unsafe script trying to load and blocks some people from accessing the site.
It says '' was loaded over https , but requested an insecure XMLHttpRequest endpoint. '' This request has been blocked; the content must be served over HTTPS.
Do I need to do something special for XMLHttpRequest ?
If I load the 'unsafe script' it loads the XML in normal HTTP and works but then there is a line through the HTTPS.
3 Replies
- Greg_Labelle
Nimbostratus
Can you post a copy of the iRule that is redirecting the traffic? - Christian_Greyl
Nimbostratus
Hi This is the HTTP to HTTPS irule. when HTTP_REQUEST { HTTP::redirect "https://[HTTP::host][HTTP::uri]" } I should also add these two rules that redirect to two different servers based on the URL after the traffic is moved to HTTPS when HTTP_REQUEST { if { [HTTP::host] equals "smartit.randomdomain.com" and [HTTP::uri] equals "/" }{ HTTP::redirect "https://smartit.randomdomain.com/ux/smart-it//" } if { [HTTP::host] equals "myit.randomdomain.com" and [HTTP::uri] equals "/" } { HTTP::redirect "https://myit.randomdomain.com/ux/myitapp//" } } - Christian_Greyl
Nimbostratus
It was the application that was at fault.
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
