title: Fetch API cannot load, cors
body: <p>In my <code>React</code> app I am trying to make a <code>GET</code> request from my heroku server to get a list of users:</p>
  
  <pre><code>https://blablabla.heroku.com/users
  </code></pre>
  
  <p>using the following request:</p>
  
  <pre><code>const sendSearch = fetch('/https://blablabla.heroku.com/users', {credentials: 'same-origin'})
  
  function loadMyUsers(data) {
    data.json().then((jsonData) =&gt; {
      // console.log(jsonData)
  
    })
  }
  
  sendSearch.then(loadMyUsers)}
  </code></pre>
  
  <p>However I get the following error:</p>
  
  <pre><code>Fetch API cannot load https://blablabla.heroku.com/users.
  Response to preflight request doesn't pass access control check: No
  'Access-Control-Allow-Origin' header is present on the requested
  resource. Origin 'http://localhost:8080' is therefore not allowed
  access. If an opaque response serves your needs, set the request's mode
  to 'no-cors' to fetch the resource with CORS disabled.
  </code></pre>
  
  <p>I tried changing my Fetch method to many things similar to:</p>
  
  <pre><code>const sendSearch = fetch('https://blablabla.heroku.com/users',{
    method: 'GET',
    headers: {
      'Accept': 'application/json',
      'Content-Type': 'application/json',
      'mode': 'no-cors'
    }
  })
  </code></pre>
  
  <p>but the problem persists. </p>
  
  <p>How do I make the cross domain request? </p>