inertiajs / inertia

Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.
https://inertiajs.com
MIT License
6.54k stars 432 forks source link

All Inertia requests must receive a valid Inertia response, however a plain JSON response was received. #1923

Open OrlandisCS opened 4 months ago

OrlandisCS commented 4 months ago

Version:

Describe the problem:

In firefox I am receiving the response of All Inertia requests must receive a valid Inertia response, however a plain JSON response was received. This only happens in Firefox since after checking in other browsers it does not happen, also try to configure .htaccess exposing the headers Header always set Access-Control-Expose-Headers "X-Inertia" Without any results, I have heard that the following works for nginx: add_header 'Access-Control-Expose-Headers' 'X-Inertia'; but in my case there was no luck

Steps to reproduce:

You just need to send an inertia js render with a lot of data

image

PedroAugustoRamalhoDuarte commented 3 months ago

Hello @OrlandisCS, probably is a problem with your backend adapter, can you share more infos please? We have a discord to help in these cases: https://discord.gg/qzRTH4vU