mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-05-13 15:09:25 +00:00
Detect port from environment
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
var host = '127.0.0.1';
|
||||
var port = 8080;
|
||||
// Heroku defines the environment variable PORT, and requires the binding address to be 0.0.0.0
|
||||
var host = process.env.PORT ? '0.0.0.0' : '127.0.0.1';
|
||||
var port = process.env.PORT || 8080;
|
||||
|
||||
var cors_proxy = require("./lib/cors-anywhere");
|
||||
cors_proxy.createServer({
|
||||
|
||||
Reference in New Issue
Block a user