title: Post request giving CORS error in React JS
body: <p>I am getting CORS error on localhost during post request call. below is the code</p>
  <pre><code> fetch('http://sandbox.mywebsite.com/api//product-list/', {
    method: 'POST',
    headers: {
      'Accept': 'application/json',
      'Access-Control-Allow-Origin': '*',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      &quot;category_id&quot;:1
    })
  })
  </code></pre>
  <p>Same giving proper response when testing on <a href="https://inspector.swagger.io/builder" rel="nofollow noreferrer">https://inspector.swagger.io/builder</a> .
  Any help will be appreciated <a href="https://i.stack.imgur.com/c96O0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c96O0.png" alt="enter image description here" /></a></p>