aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-10-21 08:31:56 -0500
committerGitHub <noreply@github.com>2021-10-21 08:31:56 -0500
commitbda2939f940656d3a209c5bd8315e724360a40a3 (patch)
treeb8545696b923879dc75275cc3126540aee77b85b /src
parent42c83ed537f4cadd56d343ff83898ddfff52686d (diff)
parentb2f97267016178577f13f2c460174259042fd37f (diff)
downloadslskd-bda2939f940656d3a209c5bd8315e724360a40a3.tar.gz
Merge pull request #232 from slskd/url-base
Fix bug preventing SignalR hubs from connecting behind a reverse proxy
Diffstat (limited to 'src')
-rw-r--r--src/web/src/config.js4
-rw-r--r--src/web/src/lib/hubFactory.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/web/src/config.js b/src/web/src/config.js
index bd05aea5..ea71e9dd 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' ? '' : 'http://localhost:5000/';
+const baseUrl = `${rootUrl}api/v0`;
const tokenKey = 'slskd-token';
const tokenPassthroughValue = 'n/a';
const activeChatKey = 'slskd-active-chat';
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