1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

update settings comments to describe how to setup for ipv6 (#1675)

* change default server bind to support ipv6 and ipv4

to close #1674

* Add comment re ipv6 so folk know it's capable

* slightly more words re ipv6 config

* Leave defaults as ipv4 but add doc to settings
This commit is contained in:
Dave Conway-Jones 2018-05-01 12:43:10 +01:00 committed by Nick O'Leary
parent 3190de873e
commit e691351976
2 changed files with 3 additions and 2 deletions

2
red.js
View File

@ -276,7 +276,7 @@ function getListenPath() {
} }
var listenPath = 'http'+(settings.https?'s':'')+'://'+ var listenPath = 'http'+(settings.https?'s':'')+'://'+
(settings.uiHost == '0.0.0.0'?'127.0.0.1':settings.uiHost)+ (settings.uiHost == '::'?'localhost':(settings.uiHost == '0.0.0.0'?'127.0.0.1':settings.uiHost))+
':'+port; ':'+port;
if (settings.httpAdminRoot !== false) { if (settings.httpAdminRoot !== false) {
listenPath += settings.httpAdminRoot; listenPath += settings.httpAdminRoot;

View File

@ -23,6 +23,7 @@ module.exports = {
uiPort: process.env.PORT || 1880, uiPort: process.env.PORT || 1880,
// By default, the Node-RED UI accepts connections on all IPv4 interfaces. // 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 // The following property can be used to listen on a specific interface. For
// example, the following would only allow connections from the local machine. // example, the following would only allow connections from the local machine.
//uiHost: "127.0.0.1", //uiHost: "127.0.0.1",