Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

EmilMoe's avatar
Level 10

Laravel and Inertia: Plain response

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

How do I get rid of this? It works on my local machine with Valet, but not on my server which runs Caddy2.

Response headers are:

content-length: 314
content-type: text/html; charset=UTF-8
date: Fri, 02 Jul 2021 12:40:13 GMT
server: Caddy
x-powered-by: PHP/8.0.6
0 likes
1 reply
EmilMoe's avatar
EmilMoe
OP
Best Answer
Level 10

Error was a blank link in the beginning of a routes file

Please or to participate in this conversation.