aboutsummaryrefslogtreecommitdiffstats
path: root/src/web
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-10-21 07:37:57 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-10-21 07:37:57 -0500
commite594fccddc44c695f199340c35ada8b4c80c0922 (patch)
tree3b9583180c61d9a3d9640af57a64159e08f701f9 /src/web
parent2497369f825f0d5362f835430ad92a38fa53dfcd (diff)
downloadslskd-e594fccddc44c695f199340c35ada8b4c80c0922.tar.gz
take only the first segment
Diffstat (limited to 'src/web')
-rw-r--r--src/web/src/config.js2
1 files changed, 1 insertions, 1 deletions
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';