My bad. I haven't successfully obtained the Let's Encrypt SSL because I did not remove the www.domain.com before clicking Obtain Certificate. After removing that, I re-obtained and now the https is working.
Sep 10, 2021
1
Level 8
nginx https force redirection
Good day everyone! I have successfully deployed my app on Laravel Forge and it's obviously not in https.
I've obtained LetsEncrypt by clicking Obtain Certificate and added the below code to my AppServiceProvider.php
if (config('app.env') === 'production') {
URL::forceScheme('https');
}
The site is not loading all the assets after adding the above code when in https, but if I access the asset with http it's loading by directly opening it. Also it's not forcing the site to https
This is what it is looks like in the browser's address bar
But in console the assets are in https
https://domain.com/asset/style.css
My Site Environment
APP_URL=https://domain.com
Level 8
Please or to participate in this conversation.