Have you tested session by setting something and retrieving it on another page?
May 30, 2025
1
Level 1
laravel application csrf token giving 419 when using docker how to solve
I'm working on a Laravel application that I'm running locally using Docker. The application loads, but I'm facing an issue with the CAPTCHA and login.
When I try to access a page with a CAPTCHA, it fails to generate.
In the browser’s Network tab, I see a 419 Page Expired error.
If I manually bypass the CSRF token (not ideal), the CAPTCHA appears — but I still can’t log in to the application.
I suspect the issue is related to CSRF tokens and session handling in Docker.
Docker Compose for local setup
Nginx as reverse proxy inside Docker
Please or to participate in this conversation.