phplaravelinertiajslaravel-breeze

Laravel 10 - Breeze, React, Inertia - 419 error on initial install


Really not sure what to do here, I have set up a fresh Laravel 10.0.3 application, installed Laravel Breeze and selected React and no to SSR.

I have migrated my DB and setup my .env, basically if I use php artisan serve the Inertia response works and does not error with a 419 however if I change the APP_URL in the env to a different domain other than localhost, the request does not work and returns the 419.

How can I change the URL in my .env file and maintain the correct intertia response? Do I have to vendor publish some settings, or add my custom domain to a session config or any other config for that matter? Thanks in advance.


Solution

  • I worked it out, I had changed my APP_URL after I had loaded the page so the session cookie was old, after deleting my cookies it worked as expected.