title: Laravel cors 'Access-Control-Allow-Origin' and 'Access-Control-Allow-Headers'
body: <p>I am new to Laravel.</p>
  
  <p>I tried <a href="https://github.com/barryvdh/laravel-cors" rel="nofollow">https://github.com/barryvdh/laravel-cors</a>.</p>
  
  <p>When I add</p>
  
  <pre><code>header('Access-Control-Allow-Origin: *');
  </code></pre>
  
  <p>in my public/index.php, it does not add the Content-Type in the response.</p>
  
  <p>When I add</p>
  
  <pre><code>header('Access-Control-Allow-Origin: *');
  header('Access-Control-Allow-Headers: Origin, Content-Type');
  </code></pre>
  
  <p>It does not add Access-Control-Allow-Origin.</p>
  
  <p>I am very confused by all various solutions I find on internet.
  How exactly should I go about this?</p>