I have a free-hosted application on Heroku. When I try a submit a form using a POST request, I get the 319 page expired
error.
I, of course, added @csrf
to my form and i'm sure that the token is being sent along with the form.
It's also worth mentioning that the form submit works fine on localhost.
I know this is a problem in the VerifyCsrfToken
middleware as the form submit works fine when I comment out that middleware in the kernel.php
file.
I suspected this would be a problem in the session file
driver (maybe heroku doesn't allow creating files), so I tried to use the database
session driver and even the cookie
one but none of them worked.
whenever the VerifyCsrfToken
middleware is enabled, I always get 319 page expired
error when submitting the form.
any ideas?