diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-10-21 07:37:57 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-10-21 07:37:57 -0500 |
| commit | e594fccddc44c695f199340c35ada8b4c80c0922 (patch) | |
| tree | 3b9583180c61d9a3d9640af57a64159e08f701f9 /src | |
| parent | 2497369f825f0d5362f835430ad92a38fa53dfcd (diff) | |
| download | slskd-e594fccddc44c695f199340c35ada8b4c80c0922.tar.gz | |
take only the first segment
Diffstat (limited to 'src')
| -rw-r--r-- | src/web/src/config.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/web/src/config.js b/src/web/src/config.js index 3ffd4107..7164e594 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 : 'http://localhost:5000/'; +const rootUrl = process.env.NODE_ENV === 'production' ? window.location.href.split('/')[1] : 'http://localhost:5000/'; const baseUrl = `${rootUrl}api/v0`; const tokenKey = 'slskd-token'; const tokenPassthroughValue = 'n/a'; |
