From 58ba1ce5b6183d73c1aeb51a1fe6a7f636fdc774 Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Mon, 13 Jul 2020 13:35:37 -0500 Subject: [PATCH] Modified response to include port if exists --- src/misc/utils.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/misc/utils.ts b/src/misc/utils.ts index e9b8b4911d..119e9361ed 100644 --- a/src/misc/utils.ts +++ b/src/misc/utils.ts @@ -157,7 +157,13 @@ export class Utils { static getHostname(uriString: string): string { const url = Utils.getUrl(uriString); try { - return url != null && url.hostname !== '' ? url.hostname : null; + let hostname = url != null && url.hostname !== '' ? url.hostname : null; + + if(hostname != null && url.port !== '') { + hostname += ":" + url.port; + } + + return hostname; } catch { return null; }