diff options
Diffstat (limited to 'src/cors-proxy.js')
| -rw-r--r-- | src/cors-proxy.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cors-proxy.js b/src/cors-proxy.js new file mode 100644 index 0000000..905eb0f --- /dev/null +++ b/src/cors-proxy.js @@ -0,0 +1,12 @@ +var host = process.env.HOST || '127.0.0.1'; +var port = process.env.PORT || 8088; + +var cors_proxy = require('cors-anywhere'); +cors_proxy.createServer({ + originWhitelist: [], // Allow all origins + requireHeader: ['origin', 'x-requested-with'], + removeHeaders: ['cookie', 'cookie2'], + checkRateLimit: null, +}).listen(port, host, function() { + console.log('Running CORS Anywhere on ' + host + ':' + port); +}); |
