title: What configuration am I doing wrong in Laravel 8 Cors?
body: <p>I am working with an API in Laravel 8, everything works perfect except for a problem that I am having with the Cors file.</p>
  <p>What I want to do is that the GETs of an API can only be consulted from <a href="http://www.exampledomain.com" rel="nofollow noreferrer">www.exampledomain.com</a>
  In the cors.php file I have the following configuration:</p>
  <pre><code>'paths' =&gt; ['api / *', 'sanctum / csrf-cookie'],
  'allowed_methods' =&gt; ['*'],
  'allowed_origins' =&gt; ['www.exampledomain.com'],
  'allowed_origins_patterns' =&gt; [],
  'allowed_headers' =&gt; ['*'],
  'exposed_headers' =&gt; [],
  'max_age' =&gt; 0,
  'supports_credentials' =&gt; false,
  </code></pre>
  <p>However it allows me to make GET requests from another domain.</p>
  <p>Is there something I'm doing wrong here?</p>
  <p>I understand that this used to be done with Middlewares, but according to the official <a href="https://laravel.com/docs/8.x/routing#cors" rel="nofollow noreferrer">Laravel documentation</a> that no longer needs to be done.</p>