Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Stubbs's avatar
Level 1

Why are css & js preloaded with http rather than https?

I have a site that I am building and when it gets deployed it's served via FrankenPHP with Traefik doing the ingress & TLS.

The issue I have it the URLs for all the css & js the page wants to preload is done via http. My browser upgrades this to https before the request is sent but I can't rely on that for everyone, and tbh, it just looks nasty in the console log :-)

I'm not sure if the problem is from the way Vue is being compiled, or if it's because everything behind Traefik is served via http, it could be because the request arrives at FrankenPHP as plain, it assumes to reply the same way? Is there an option to force FrankenPHP to assume https by default?

0 likes
1 reply
Stubbs's avatar
Stubbs
OP
Best Answer
Level 1

In the end this was down to an environment variable in our deployment process :facepalm:

Please or to participate in this conversation.