php - Response::json() returns text/html as content type -
I am currently experiencing a strange problem and I can not narrow this issue.
In my large application I am recovering the data via AJAX. Therefore, answer parts of the application with the Everything works fine on my local webserver. I get a I deployed the application on the server ( also the epee ) and tested it. But here's the problem I'm not getting the proper content type anymore, instead I get the So there is a bunch of potential problem sources and I am not very much in server configuration. Please refrain from posting answers that suggest content-type and parsing it on client side, if necessary, though it would be possible , The server should not behave like this and I'm trying to explain why Not on your production environment I know you have made sure that the server has Jason Extension and it is enabled, but you can double check on your production server You can: application / JSON content-type.
Return response: json (['message' = & gt; few messages']);
content-type: application / jason as a response.
text / html .
set locally in the feedback header -cookie which includes the following:
laravel_session = [...] while the server does not respond.
AddType You have Apache configuration (on
/etc/apache2/mods-available/mime.conf ) / json .json is the director?
mime enabled (
a2enmod mime ?)
Comments
Post a Comment