title: How do you handle CORS in an electron app?
body: <p>I'm building an electron app and need to call APIs where the API provider has not enabled CORS.  The typically proposed solution is to use a reverse proxy which is trivial to do when running locally by using node and cors-anywhere like this:</p>
  <pre><code>let port = (process.argv.length &gt; 2) ? parseInt (process.argv[2]) : 8080; 
  require ('cors-anywhere').createServer ().listen (port, 'localhost');
  </code></pre>
  <p>The app can then be configured to proxy all requests through the reverse proxy on localhost:8080.</p>
  <p>So, my questions are:</p>
  <ol>
  <li><p>Is it possible to use node and cors-anywhere in an electron app to create a reverse proxy?  I don't want to force the app to make calls to a remote server.</p>
  </li>
  <li><p>Is there a better or standard way of doing this in an Electron app? I'm assuming I'm not the first to run into CORS issues. :)</p>
  </li>
  </ol>