Subject: Issue with Loading Assets over HTTPS in Voyager
Hello,
Our team is facing an issue with loading assets over HTTPS in the back-office part of our application using the Wave boilerplate, which is managed by Voyager. We managed to resolve a similar issue in the front-office part by adding an ASSET_URL environment variable. However, when we access the /admin page, we encounter the problem of assets loading over HTTP instead of HTTPS again.
We have tried several approaches to solve this issue, but none have been successful so far. Here is a summary of what we have attempted:
- Checking and adjusting the APP_URL configuration in the .env file to ensure it uses https://.
- Forcing HTTPS in the AppServiceProvider via URL::forceScheme('https').
- Configuring our web server (Apache/Nginx) to systematically redirect HTTP requests to HTTPS.
Despite these efforts, the assets loaded from the Voyager /admin part continue to use the HTTP protocol, causing mixed content warnings in browsers.
I was wondering if you had ever encountered this problem or if you could offer any advice on how to handle it. Any help or direction would be greatly appreciated to ensure our application operates securely under HTTPS without mixed content warnings.
Thank you in advance for your time and assistance.
Have a great day!
Hey!
I tried to replicate this behaviour on my end, but I was only able to do so when setting the APP_URL
in my .env
file to http://mydomain.com
.
Once I've changed the APP_URL
to https://mydomain.com
the mixed content warnings disappeared.
Did you by any chance also run php artisan config:clear
after changing your APP_URL
?
If you still can get this to work and if you can share your server credentials with me, I'm happy to troubleshoot this for you further!
Thanks for these insights mate as I was looking for this only