title: How to use Cors anywhere to reverse proxy and add CORS headers
body: <p>I've been reading for two hours the documentation of this Reverse proxy to add CORS headers, and I'm not able to use. Can you please help with a simple example how to use that.</p>
  
  <p><a href="https://www.npmjs.com/package/cors-anywhere" rel="noreferrer">CORS-ANYWHERE</a></p>
  
  <p>I've tried that example in a javascript </p>
  
  <pre><code>(function() {
  var cors_api_host = 'cors-anywhere.herokuapp.com';
  var cors_api_url = 'https://' + cors_api_host + '/';
  var slice = [].slice;
  var origin = window.location.protocol + '//' + window.location.host;
  var open = XMLHttpRequest.prototype.open;
  XMLHttpRequest.prototype.open = function() {
      var args = slice.call(arguments);
      var targetOrigin = /^https?:\/\/([^\/]+)/i.exec(args[1]);
      if (targetOrigin &amp;&amp; targetOrigin[0].toLowerCase() !== origin &amp;&amp;
          targetOrigin[1] !== cors_api_host) {
          args[1] = cors_api_url + args[1];
      }
      return open.apply(this, args);
  };
  })();
  </code></pre>
  
  <p>I don't understand really if I need node.js or what exactly</p>