const cors_proxy = require('cors-anywhere') const host = 'localhost' const port = 1337 cors_proxy .createServer({ originWhitelist: [], requireHeader: ['origin', 'x-requested-with'], removeHeaders: [ 'cookie', 'cookie2', 'x-request-start', 'x-request-id', 'via', 'connect-time', 'total-route-time', ], redirectSameOrigin: true, httpProxyOptions: { // Do not add X-Forwarded-For, etc. headers, because Heroku already adds it. xfwd: false, }, }) .listen(port, host, () => { console.log(`Running CORS Anywhere on 'http://${host}:${port}/'`) })