Skip to content

Commit

Permalink
Leave defaults as ipv4 but add doc to settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Conway-Jones committed Mar 27, 2018
1 parent d901b10 commit a4f2637
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions red.js
Expand Up @@ -177,7 +177,7 @@ if (parsedArgs.port !== undefined){
}
}

settings.uiHost = settings.uiHost||"::";
settings.uiHost = settings.uiHost||"0.0.0.0";

if (flowFile) {
settings.flowFile = flowFile;
Expand Down Expand Up @@ -276,7 +276,7 @@ function getListenPath() {
}

var listenPath = 'http'+(settings.https?'s':'')+'://'+
(settings.uiHost == '::'?'localhost':settings.uiHost)+
(settings.uiHost == '::'?'localhost':(settings.uiHost == '0.0.0.0'?'127.0.0.1':settings.uiHost))+
':'+port;
if (settings.httpAdminRoot !== false) {
listenPath += settings.httpAdminRoot;
Expand Down
6 changes: 2 additions & 4 deletions settings.js
Expand Up @@ -22,13 +22,11 @@ module.exports = {
// the tcp port that the Node-RED web server is listening on
uiPort: process.env.PORT || 1880,

// By default, the Node-RED UI accepts connections on all IPv4 and IPv6 interfaces.
// If for some reason IPv6 is not available, set uiHost to "0.0.0.0",
// By default, the Node-RED UI accepts connections on all IPv4 interfaces.
// To listen on all IPv6 addresses, set uiHost to "::",
// The following property can be used to listen on a specific interface. For
// example, the following would only allow connections from the local machine.
//uiHost: "127.0.0.1",
// or for the ipv6 equivalent
//uiHost: "::1",

// Retry time in milliseconds for MQTT connections
mqttReconnectTime: 15000,
Expand Down

0 comments on commit a4f2637

Please sign in to comment.