title: CORS errors using Spring Boot, Spring Security and React
body: <p>Good morning.</p>
  <p>I have been fighting with this issue for the past two days so I decided to post a question about it.</p>
  <p>Basically I have a Spring Boot project which executes basic CRUD operations through a React JS front-end.
  Everything seemed to work fine until I added Spring Security to the project. Since then whenever I make a request (using axios) from the front-end I get the following error:</p>
  <pre><code>Access to XMLHttpRequest at 'http://localhost:8080/calciatore/list' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  </code></pre>
  <p>Before implementing Spring Security everything worked perfectly just using <code>@CrossOrigin(origins = &quot;*&quot;)</code> in my back-end controllers, but now I always get that error even if the URL is configured not to be protected through login by Spring Security.</p>
  <p>In the meanwhile, I have no problems making any request (POST for login or GET for data fetching) from Postman.</p>
  <p>I tried looking for a solution all around the internet but still didn't find one.</p>
  <p>If you need me to show a portion of code just ask.</p>
  <p>Thanks in advance.</p>