Issue with Filament Session on Production after Deploying with Laravel Forge on DigitalOcean
Hi everyone,
I’ve recently deployed a Laravel project using Laravel Forge, hosted on DigitalOcean. The project is a Filament-based application, and everything was working perfectly on my local machine. However, after deploying to the server, I started encountering session issues—users were unable to log in, and the session data wasn’t being stored properly.
After some troubleshooting, I discovered that the problem was resolved when I changed the APP_ENV setting in the .env file from production to local. With APP_ENV=local, the session works fine, and users are able to log in as expected. But, of course, running the app in a "local" environment on a live production server raises security concerns.
Here’s my main question:
What are the risks of keeping APP_ENV=local in a production environment? Is there a more appropriate solution to fix the session issue while maintaining a production environment? I would appreciate any guidance on how to properly resolve this session issue while keeping my app in a secure and production-ready state.
Thanks in advance!
I’ve recently deployed a Laravel project using Laravel Forge, hosted on DigitalOcean. The project is a Filament-based application, and everything was working perfectly on my local machine. However, after deploying to the server, I started encountering session issues—users were unable to log in, and the session data wasn’t being stored properly.
After some troubleshooting, I discovered that the problem was resolved when I changed the APP_ENV setting in the .env file from production to local. With APP_ENV=local, the session works fine, and users are able to log in as expected. But, of course, running the app in a "local" environment on a live production server raises security concerns.
Here’s my main question:
What are the risks of keeping APP_ENV=local in a production environment? Is there a more appropriate solution to fix the session issue while maintaining a production environment? I would appreciate any guidance on how to properly resolve this session issue while keeping my app in a secure and production-ready state.
Thanks in advance!