From e72c83b98098ee0cb07125206ecfc8e508762a54 Mon Sep 17 00:00:00 2001 From: Ari Date: Sat, 4 Jun 2022 16:09:52 -0400 Subject: [PATCH] location fix --- webapp/src/apiService/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/apiService/index.ts b/webapp/src/apiService/index.ts index e308587..30c8e21 100644 --- a/webapp/src/apiService/index.ts +++ b/webapp/src/apiService/index.ts @@ -8,7 +8,7 @@ const locationPrefixWeb = window.location.pathname.match(/(.+)\/web/i); const baseURL = new URL( process.env.NODE_ENV === 'development' ? "http://localhost:8000" : - (!locationPrefixWeb ? '' : locationPrefixWeb[1]) + window.location.origin + (!locationPrefixWeb ? '' : locationPrefixWeb[1]) ); export const wsURL = baseURL + "socket" console.log({ baseURL, wsURL })