diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-10-21 08:25:16 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-10-21 08:25:16 -0500 |
| commit | b2f97267016178577f13f2c460174259042fd37f (patch) | |
| tree | b8545696b923879dc75275cc3126540aee77b85b /src/web | |
| parent | e594fccddc44c695f199340c35ada8b4c80c0922 (diff) | |
| download | slskd-b2f97267016178577f13f2c460174259042fd37f.tar.gz | |
actually fix the problem
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/src/config.js | 2 | ||||
| -rw-r--r-- | src/web/src/lib/hubFactory.js | 4 |
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 |
