title: Response::json() returns text/html as content type
body: <p>I'm currently facing a strange problem and I cannot narrow down the issue.</p>
  
  <p>In my Laravel application I am retrieving data via AJAX. Therefore parts of the application respond with the <code>application/json</code> content-type.</p>
  
  <pre><code>return Response::json(['message' =&gt; 'Some message']);
  </code></pre>
  
  <p>on my local webserver everything works just fine. I get <code>Content-Type:application/json</code> as a response.</p>
  
  <p>I deployed the application on the server (<em>also apache</em>) and tested it. But here is the problem. I do not get the proper content-type anymore. Instead I get <code>text/html</code>.</p>
  
  <p>So there's a bunch of possible problem sources and I am not too much into server configuration. But here are the things I already tried:</p>
  
  <ul>
  <li>Made sure that the server has the json extension and it is enabled</li>
  <li>Checked the laravel source for hints why it would not return the proper content/type (I couldn't find anything)</li>
  <li>Checked the response contents locally and on the server (it does not differ)</li>
  <li>I noticed that the Response-Header contains locally <code>Set-Cookie</code> which contains: <code>laravel_session=[...]</code> whereas the response on the server does not.</li>
  </ul>
  
  <p><em>Please refrain from posting  answers that suggest to check for the content-type and parse it if necessary on the client side, because although that would be possible, the server should not behave like that and I'm trying to figure out why</em></p>