Mixed content errors

In my case all the ressources are loaded under https but the content is blocked saying the script is not secure and it throws tons of line of mixed-content errors like:

Mixed Content: The page at ‘https://hub.domain.com/’ was loaded over HTTPS, but requested an insecure script ‘http://hub.domain.com/_resources/themes/hub/javascript/bootstrap/bootstrap.min.js?m=1679784696’. This request has been blocked; the content must be served over HTTPS.

So it’s served over https, but I need to serve over https, makes not much sense to me “Your car is blue which is beautiful, but your car would look great if it was blue”. A lot of mixed signal.

The message is pretty clear there… your site is being loaded over https, but your resources are being requested via http, so the browser refuses to load them. How is the site hosting configured? Are you using a proxy or CDN? Have you specified the base url anywhere in the setup?

1 Like

There’s not a single script loaded from an http URL, that’s why I don’t understand the error. I never load anything under http.

I wouldn’t ask for help on the support for this type of mistakes

The error message you posted says there is. The Bootstrap JS from the ‘hub’ theme is being loaded on http. So, the question is why. Is there a hard-coded reference somewhere in the template or a requirements call in a controller? Is the base URL set correctly in the page?

There are only requirements directly loaded from the server through https, self hosted. The issue appeared way after all the pages were built and it didn’t appear during a development. As I’m not a server savvy, I’ve decided to reinstall everything from scratch and the same code reuploaded on a shared server does work perfectly. So up to now I have no idea of what triggered this issue but it’s clearly not the code, might be something to do with server configuration. I’m now working on the new installation so it’s “resolved” for the time being. I will obviously need to revise my knowledge of server configuration if I want to come to a VPS.

Thanks for the support Tim!