diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-10-21 07:19:49 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-10-21 07:19:49 -0500 |
| commit | 2497369f825f0d5362f835430ad92a38fa53dfcd (patch) | |
| tree | b2c9336372061865de564e0f7003a573cfd5060a /src | |
| parent | 42c83ed537f4cadd56d343ff83898ddfff52686d (diff) | |
| download | slskd-2497369f825f0d5362f835430ad92a38fa53dfcd.tar.gz | |
fix relative urls in production
Diffstat (limited to 'src')
| -rw-r--r-- | src/web/src/config.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/web/src/config.js b/src/web/src/config.js index bd05aea5..3ffd4107 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' ? window.location.href : 'http://localhost:5000/'; +const baseUrl = `${rootUrl}api/v0`; const tokenKey = 'slskd-token'; const tokenPassthroughValue = 'n/a'; const activeChatKey = 'slskd-active-chat'; |
