-
I'm using traefik as a reverse proxy. So i'm using Let's encrypt as a provider. What i want is to activate SSL_MODE="on". The issue is it generates SSL certificate by default. So i disabled this option to fiw the issue, but all url assets in my website are generated with http not https (Im developing my app with Laravel so i know for sure this is not related to laravel). How can be sure that urls will be generated with https. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
If you're running Vite you may need to update some configs? https://getspin.pro/docs/services/vite#getting-vite-assets-to-load-over-https-in-production |
Beta Was this translation helpful? Give feedback.
It is set with Https. But somehow i figured out what may cause the problem, so if anyone is having the same issue this typically happens because Laravel doesn't automatically detect that the request is coming through HTTPS when he is behind a reverse proxy like Traefik. The reverse proxy is terminating the SSL connection, and Nginx inside the container is seeing the request as http, even though it originally came over https.
To fix the issue you should add this to your boostrap/app: