From 543f921ec71e90c64e05340acc58db23a618f220 Mon Sep 17 00:00:00 2001 From: Janaka-Steph Date: Tue, 3 Oct 2023 15:13:02 +0200 Subject: [PATCH] Check if isIP --- src/shared/helpers/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/helpers/utils.ts b/src/shared/helpers/utils.ts index f5d79666..b1ac4d2b 100644 --- a/src/shared/helpers/utils.ts +++ b/src/shared/helpers/utils.ts @@ -191,7 +191,7 @@ export const UPSCALER_ID = "upscaler"; export const getServiceUrl = (invokeMethod: Service["invokeMethod"], pathname: string) => { let serviceUrl = "http://localhost:54321"; if (isProxyEnabled()) { - if (invokeMethod.header) { + if (invokeMethod.header && isIP(window.location.host)) { serviceUrl = `${window.location.protocol}//${window.location.host}/`; } else { serviceUrl = invokeMethod.baseUrl;