title: Laravel + Vue - CORS errors
body: <p>I am developing a Laravel API + Vue.js frontend app. Those 2 projects are on separate servers. I am having a CORS policy problem in production (on local I had, but I managed to fix it).</p>
  <p>So basically, there are 2 errors right now. I am having this error:</p>
  <blockquote>
  <p>Access to XMLHttpRequest at '--Laravel url--' from origin '--Vue url--' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.</p>
  </blockquote>
  <p>While my co-worker is getting this error:</p>
  <blockquote>
  <p>Access to XMLHttpRequest at '--Laravel url--' from origin '--Vue url--' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.</p>
  </blockquote>
  <p>We tried a few things:
  Configurating CORS on Laravel side:</p>
  <ul>
  <li>setting CORS middleware - no effect</li>
  <li>changing CORS config .php file - no effect
  Configurating CORS on Vue side:</li>
  <li>adding origin header to form - no effect</li>
  </ul>
  <p>The response is also displaying in browser as being same-site although it is not.</p>
  <p>Anyone can help? We have been searching for answer for nearly 3 days.</p>