aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/web/src/config.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/web/src/config.js b/src/web/src/config.js
index ea71e9dd..8acec820 100644
--- a/src/web/src/config.js
+++ b/src/web/src/config.js
@@ -1,5 +1,7 @@
-const rootUrl = process.env.NODE_ENV === 'production' ? '' : 'http://localhost:5000/';
-const baseUrl = `${rootUrl}api/v0`;
+const urlBase = window.urlBase || '';
+const rootUrl = process.env.NODE_ENV === 'production' ? urlBase : `http://localhost:5000${urlBase}`;
+const apiBaseUrl = `${rootUrl}/api/v0`;
+const hubBaseUrl = `${rootUrl}/hub`;
const tokenKey = 'slskd-token';
const tokenPassthroughValue = 'n/a';
const activeChatKey = 'slskd-active-chat';
@@ -7,8 +9,10 @@ const activeRoomKey = 'slskd-active-room';
const activeUserInfoKey = 'slskd-active-user';
export {
+ urlBase,
rootUrl,
- baseUrl,
+ apiBaseUrl,
+ hubBaseUrl,
tokenKey,
tokenPassthroughValue,
activeChatKey,