Can't make request to API on React-Native app when Debug JS Remotely is enabled
<p>I currently work on a React-Native mobile app.</p>

<p>The requests to the server API using <code>fetch</code> works fine, but when I open the "Debug JS Remotely" with Google Chrome, it creates some kind of localhost server and the calls are made from it, and I get the following error from the server API:</p>

<blockquote>
  <p>XMLHttpRequest cannot load <a href="https://my.server.com/data" rel="noreferrer">https://my.server.com/data</a>. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://localhost:8081" rel="noreferrer">http://localhost:8081</a>' is therefore not allowed access.</p>
</blockquote>

<p>It's pretty annoying not to be able to track the requests to the server in debug mode. </p>

<p>Any of you have faced a similar issue and do you have a way around it?</p>

<p>Thanks</p>