proxy.js 525 B

1234567891011121314
  1. // Listen on a specific host via the HOST environment variable
  2. const host = process.env.HOST || '0.0.0.0';
  3. // Listen on a specific port via the PORT environment variable
  4. const port = process.env.PROXY_PORT || 8085;
  5. const corsProxy = require('cors-anywhere');
  6. corsProxy.createServer({
  7. originWhitelist: [], // Allow all origins
  8. // requireHeader: ['origin', 'x-requested-with'],
  9. removeHeaders: ['cookie', 'cookie2']
  10. }).listen(port, host, function () {
  11. console.log('Running CORS Anywhere on ' + host + ':' + port);
  12. });