Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,16 @@ const start = async function start() {

address.hostname = address.address;

// fix #131 - server address reported as 127.0.0.1 for localhost
if (address.hostname !== this.options.host && this.options.host === 'localhost') {
address.hostname = this.options.host;
}

// we set this so the client can use the actual hostname of the server. sometimes the net
// will mutate the actual hostname value (e.g. :: -> [::])
this.options.address = url.format(address);

const uri = `${protocol}://${url.format(this.options.address)}`;
const uri = `${protocol}://${this.options.address}`;

this.log.info('Server Listening on:', uri);

Expand Down