From f38518b8d4611ab58af658a5e2086b0e216bd767 Mon Sep 17 00:00:00 2001 From: Siddhartha Basu Date: Fri, 9 Feb 2024 17:36:02 -0600 Subject: [PATCH] fix(const.ts): use window.location.protocol instead of hardcoded 'http' for concatPath function This change ensures that the correct protocol (http or https) is used based on the current window location. This makes the application more secure and adaptable to different environments, as it will now correctly handle both secure (https) and non-secure (http) connections. --- packages/auth/src/const.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/auth/src/const.ts b/packages/auth/src/const.ts index 48bde761e6..5b50c0b4df 100644 --- a/packages/auth/src/const.ts +++ b/packages/auth/src/const.ts @@ -6,7 +6,7 @@ type UserWithRoles = UserInfoResponse & { } const concatPath = reduce( - `http://${window.location.host}`, + `${window.location.protocol}://${window.location.host}`, (accumulator: string, current: string) => `${accumulator}${current}`, )