-
Description:After upgrading our application from Laravel 9 to 10 by following the Upgrade Guide, I’ve encountered an issue with Laravel Nova’s UI. When I click on any sub-navigation item, I always receive the following error in a modal: "All Inertia requests must receive a valid Inertia response, however a plain JSON response was received." STEPS DONECORS CONFIGURATION Following a recommendation in StackOverflow, I added CORS MIDDLEWARE Replaced Laravel 10 built-in CORS with the Fruitcake package AUTHENTICATION I also had to fix user authentication. At first it was using DEPENDENCIES UPDATES
CMDs Deleted
CLASSESHere are some classes that could be involved:
Maybe it's some problem in the official
I’m at a loss. There are any additional configuration steps or middleware adjustments required to ensure Nova’s JSON responses aren’t being misinterpreted by Inertia? Any other troubleshooting steps or patches that might resolve this conflict? Thank you for your assistance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For the frontend Inertia.js code to verify that the response is via Inertia it would require Please ensure that the webserver doesn't truncate/remove the required header set by Inertia response. |
Beta Was this translation helpful? Give feedback.
You were absolutely right. I'm using a custom docker image and nginx proxy on local. I was able to fix it by adding the header in
nginx.conf
: