I have a large Laravel application (Laravel 10, PHP 8.1), recently due to a hosting issue I had to redeploy the whole thing from a backup, everything is working fine except if I need to submit any forms (which were working fine previously).
The @CSRF token is in place on the forms (and these worked fine previously). Following the steps here (419 Page Expired In Laravel Even after adding CSRF token), I have tried:
- Double checked the APP_URL settings
- Extended the SESSION_LIFETIME
- Added the SESSION_DOMAIN=myapp.local to .env
- Resetting permissions on the cache
- Updating the application
- Checked that the CSRF is generating the correct hidden field in the form
- Regenerated my application key
- Clear all the caches
- Switched the SESSION storage from file to database
- Completely binned my browsers cache, used incognite mode and a complete different browser.