fix(@embark/blockchain_process): proxy listens on the specified host

Change the blockchain proxy so that it listens on the `host` argument passed to
`Proxy#serve` rather than on `defaultHost`.
This commit is contained in:
Michael Bradley, Jr 2018-12-21 15:24:42 -06:00 committed by Michael Bradley
parent d840198fc1
commit 9e7bc53ebf
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
require('./httpProxyOverride'); require('./httpProxyOverride');
const Asm = require('stream-json/Assembler'); const Asm = require('stream-json/Assembler');
const {canonicalHost, defaultHost} = require('../../utils/host'); const {canonicalHost} = require('../../utils/host');
const constants = require('../../constants.json'); const constants = require('../../constants.json');
const {Duplex} = require('stream'); const {Duplex} = require('stream');
const http = require('http'); const http = require('http');
@ -237,7 +237,7 @@ class Proxy {
return new Promise(resolve => { return new Promise(resolve => {
server.listen( server.listen(
port - constants.blockchain.servicePortOnProxy, port - constants.blockchain.servicePortOnProxy,
defaultHost, host,
() => { resolve(server); } () => { resolve(server); }
); );
}); });