title: Access to XMLHttpRequest at '' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present
body: <p>I went through this article <a href="https://stackoverflow.com/questions/54531235/backend-and-frontend-running-on-different-port-cors-error">link</a> . Its related to node js . I am currently using Spring boot to create restful web service , react js to build front end .</p>
  <p>In the  solution it is mentioned that to <em>add the following HTTP header to the response:
  Access-Control-Allow-Headers: Content-Type</em></p>
  <p>I am also providing my front end code , can anyone please suggest me how to add this header to my response ? How to solve this problem ?</p>
  <pre><code> TodoDataService.retrieveAllTodo(username)
              .then(
                  response=&gt;{
                      console.log(response)
                      this.setState({todos:response.data})
                  }
              )
  </code></pre>
  <pre><code>class TodoDataService{
  
      retrieveAllTodo(name) {
          return axios.get(`${API_URL}/users/${name}/todos`);
      }
  }
  </code></pre>