mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix host IP fallback for webapp server
The `localIp` constant was never used, so the HTTP server was started with an `undefined` host instead of "0.0.0.0" if `process.env.BIND_IP` was `undefined`.
This commit is contained in:
@@ -883,8 +883,6 @@ function runWebAppServer() {
|
||||
};
|
||||
|
||||
let localPort = process.env.PORT || 0;
|
||||
const host = process.env.BIND_IP;
|
||||
const localIp = host || "0.0.0.0";
|
||||
const unixSocketPath = process.env.UNIX_SOCKET_PATH;
|
||||
|
||||
if (unixSocketPath) {
|
||||
@@ -899,7 +897,10 @@ function runWebAppServer() {
|
||||
startHttpServer({ path: localPort });
|
||||
} else if (typeof localPort === "number") {
|
||||
// Start the HTTP server using TCP.
|
||||
startHttpServer({ port: localPort, host: host });
|
||||
startHttpServer({
|
||||
port: localPort,
|
||||
host: process.env.BIND_IP || "0.0.0.0"
|
||||
});
|
||||
} else {
|
||||
throw new Error("Invalid PORT specified");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user