aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-10-21 07:19:49 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-10-21 07:19:49 -0500
commit2497369f825f0d5362f835430ad92a38fa53dfcd (patch)
treeb2c9336372061865de564e0f7003a573cfd5060a /src
parent42c83ed537f4cadd56d343ff83898ddfff52686d (diff)
downloadslskd-2497369f825f0d5362f835430ad92a38fa53dfcd.tar.gz
fix relative urls in production
Diffstat (limited to 'src')
-rw-r--r--src/web/src/config.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/web/src/config.js b/src/web/src/config.js
index bd05aea5..3ffd4107 100644
--- a/src/web/src/config.js
+++ b/src/web/src/config.js
@@ -1,5 +1,5 @@
-const rootUrl = process.env.NODE_ENV === 'production' ? '' : 'http://localhost:5000';
-const baseUrl = `${rootUrl}/api/v0`;
+const rootUrl = process.env.NODE_ENV === 'production' ? window.location.href : 'http://localhost:5000/';
+const baseUrl = `${rootUrl}api/v0`;
const tokenKey = 'slskd-token';
const tokenPassthroughValue = 'n/a';
const activeChatKey = 'slskd-active-chat';