0

I have migrated my app (laravel v8) to Render.com from Heroku (where the app was working fine) and have noticed on all login routes I get a '419 Page Expired'.

After googling online I have tried a number of different remedies to resolve but none have worked.

This includes the following

  • Setting env variable SAME_SITE to null/none
  • Setting env variable SESSION_DOMAIN to *.onrender.com
  • Setting env variable SESSION_DRIVER to file
  • Setting env variable SESSION_LIFETIME to 1440
  • Setting env variable SESSION_SECURE_COOKIE to false
  • Added forceScheme('https') to my AppServiceProvider
  • Ensuring there are no extra spaces before <?php in all my files (source)
  • Ensured the CSRF token in the header actually changes between different session windows.

I'm out of ideas on what else to try and would like some guidance on how to resolve this.

InvalidSyntax
  • 9,131
  • 20
  • 80
  • 127
  • 1. Is it working fine on local server? 2. have you tried `php artisan config:cache`? – Alex Jun 11 '23 at 15:49
  • I think it may be a webserver misconfiguration then, but I am not sure – matiaslauriti Jun 11 '23 at 18:31
  • @Alex yes it works fine on the local server, on the creation of the hosted app I cache the config but this happens at the start of the server for optimisation. Should I try removing this? – InvalidSyntax Jul 19 '23 at 16:03

0 Answers0