From e594fccddc44c695f199340c35ada8b4c80c0922 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 21 Oct 2021 07:37:57 -0500 Subject: take only the first segment --- src/web/src/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/web') diff --git a/src/web/src/config.js b/src/web/src/config.js index 3ffd4107..7164e594 100644 --- a/src/web/src/config.js +++ b/src/web/src/config.js @@ -1,4 +1,4 @@ -const rootUrl = process.env.NODE_ENV === 'production' ? window.location.href : 'http://localhost:5000/'; +const rootUrl = process.env.NODE_ENV === 'production' ? window.location.href.split('/')[1] : 'http://localhost:5000/'; const baseUrl = `${rootUrl}api/v0`; const tokenKey = 'slskd-token'; const tokenPassthroughValue = 'n/a'; -- cgit v1.2.3