From 0bd722c426af72670d88cefd2d864a1776dd66be Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Thu, 22 Aug 2019 18:42:47 +0300 Subject: [PATCH 1/2] - client: fix IPv6 redirect url for install Closes #953 --- client/src/helpers/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/helpers/helpers.js b/client/src/helpers/helpers.js index 0fd5baea..c9c270c3 100644 --- a/client/src/helpers/helpers.js +++ b/client/src/helpers/helpers.js @@ -140,7 +140,7 @@ export const getWebAddress = (ip, port = '') => { let address = `http://${ip}`; if (port) { - if (ip.includes(':') && !isStandardWebPort) { + if (ip.includes(':') && !ip.includes('[') && !isStandardWebPort) { address = `http://[${ip}]:${port}`; } else if (!isStandardWebPort) { address = `http://${ip}:${port}`; From c8052c23d190ebcc8437a1c61b08e685e5657e70 Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Thu, 22 Aug 2019 18:50:58 +0300 Subject: [PATCH 2/2] fix condition --- client/src/helpers/helpers.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/helpers/helpers.js b/client/src/helpers/helpers.js index c9c270c3..aeeba588 100644 --- a/client/src/helpers/helpers.js +++ b/client/src/helpers/helpers.js @@ -139,10 +139,10 @@ export const getWebAddress = (ip, port = '') => { const isStandardWebPort = port === STANDARD_WEB_PORT; let address = `http://${ip}`; - if (port) { - if (ip.includes(':') && !ip.includes('[') && !isStandardWebPort) { + if (port && !isStandardWebPort) { + if (ip.includes(':') && !ip.includes('[')) { address = `http://[${ip}]:${port}`; - } else if (!isStandardWebPort) { + } else { address = `http://${ip}:${port}`; } }