I recommend using nginx to do the redirect. Then it also works for images, js and css
HTTP to HTTPS - via Laravel or the server (nginx)
Hello,
I installed Laravel 9 with Breeze and everything works fine, but I also installed Let's Encrypt free cert but now all the URLs generated by Breeze are HTTP and the browser shows the connection is not secure.
There are a few issues:
First, Breeze uses url() helper sometimes.
Second, some POST routes are using HTTP, like the login.
For the first issue - I assume I need to go one-by-one and change every url() to secure_url().
But what about the second issue with POST routes?
Should I add the following to the boot() method in AppServiceProvider?
\URL::forceScheme('https');
Or use nginx to redirect HTTP to HTTPS?
Or there is another way?
Ty
Please or to participate in this conversation.