aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-10-21 08:25:16 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-10-21 08:25:16 -0500
commitb2f97267016178577f13f2c460174259042fd37f (patch)
treeb8545696b923879dc75275cc3126540aee77b85b
parente594fccddc44c695f199340c35ada8b4c80c0922 (diff)
downloadslskd-b2f97267016178577f13f2c460174259042fd37f.tar.gz
actually fix the problem
-rw-r--r--src/web/src/config.js2
-rw-r--r--src/web/src/lib/hubFactory.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/web/src/config.js b/src/web/src/config.js
index 7164e594..ea71e9dd 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.split('/')[1] : 'http://localhost:5000/';
+const rootUrl = process.env.NODE_ENV === 'production' ? '' : 'http://localhost:5000/';
const baseUrl = `${rootUrl}api/v0`;
const tokenKey = 'slskd-token';
const tokenPassthroughValue = 'n/a';
diff --git a/src/web/src/lib/hubFactory.js b/src/web/src/lib/hubFactory.js
index b57faa25..8ccd62ff 100644
--- a/src/web/src/lib/hubFactory.js
+++ b/src/web/src/lib/hubFactory.js
@@ -17,6 +17,6 @@ export const createHubConnection = ({ url }) =>
.configureLogging(LogLevel.Warning)
.build();
-export const createApplicationHubConnection = () => createHubConnection({ url: `${rootUrl}/hub/application` });
+export const createApplicationHubConnection = () => createHubConnection({ url: `${rootUrl}hub/application` });
-export const createLogsHubConnection = () => createHubConnection({ url: `${rootUrl}/hub/logs` }); \ No newline at end of file
+export const createLogsHubConnection = () => createHubConnection({ url: `${rootUrl}hub/logs` }); \ No newline at end of file