From 2497369f825f0d5362f835430ad92a38fa53dfcd Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 21 Oct 2021 07:19:49 -0500 Subject: fix relative urls in production --- src/web/src/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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'; -- cgit v1.2.3