Merge pull request #3597 from bepvte/fix-ipv6

Fix format of IPv6 URI
This commit is contained in:
Pavel Djundik 2019-12-16 20:33:22 +02:00 committed by GitHub
commit f0b0c53536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,6 +154,10 @@ module.exports = function(options = {}) {
const protocol = Helper.config.https.enable ? "https" : "http"; const protocol = Helper.config.https.enable ? "https" : "http";
const address = server.address(); const address = server.address();
if (address.family === "IPv6") {
address.address = "[" + address.address + "]";
}
log.info( log.info(
"Available at " + "Available at " +
colors.green(`${protocol}://${address.address}:${address.port}/`) + colors.green(`${protocol}://${address.address}:${address.port}/`) +