title: React has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header
body: <p>According to this answers <a href="https://stackoverflow.com/questions/14467673/enable-cors-in-htaccess">enable cors in .htaccess</a> I would like to allow cross-origin requests from React application to the local server with Laravel application. So I added these lines at the beginning of my public/.htaccess. But it does not work.</p>
  <pre><code>Header add Access-Control-Allow-Origin &quot;*&quot;
  Header add Access-Control-Allow-Headers &quot;origin, x-requested-with, content-type&quot;
  Header add Access-Control-Allow-Methods &quot;PUT, GET, POST, DELETE, OPTIONS&quot;
  </code></pre>
  <p>The error says:</p>
  <blockquote>
  <p>Access to XMLHttpRequest at
  'http://localhost:8000/api/page/dynamic/111170/1' from origin
  'http://localhost:3000' has been blocked by CORS policy: No
  'Access-Control-Allow-Origin' header is present on the requested
  resource.</p>
  </blockquote>
  <p>Can somebody tell me please what am I doing wrong?</p>