Support for publish_address as hostname/ip:port (#804)

This commit is contained in:
Tomas Della Vedova
2019-04-08 17:13:44 +02:00
committed by delvedor
parent 59b9403fdc
commit e530ed2313
6 changed files with 159 additions and 37 deletions

View File

@ -53,12 +53,14 @@ function buildCluster (options, callback) {
buildServer(options.handler || handler, ({ port }, server) => {
nodes[opts.id] = {
url: `http://localhost:${port}`,
url: `http://127.0.0.1:${port}`,
server
}
sniffResult.nodes[opts.id] = {
http: {
publish_address: `http://localhost:${port}`
publish_address: options.hostPublishAddress
? `localhost/127.0.0.1:${port}`
: `127.0.0.1:${port}`
},
roles: ['master', 'data', 'ingest']
}