From e9bc55cfc87def46c05bdd0ff62096e94e9e9a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 28 Jun 2022 10:30:26 +0200 Subject: [PATCH] Web: don't hard-code the API port Having the web API client override the HTTP port for the API URL is fine during development (when the web content is served through the Vite devserver), but not in production. --- web/app/src/urls.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/app/src/urls.js b/web/app/src/urls.js index 24da0260..ade7ea5c 100644 --- a/web/app/src/urls.js +++ b/web/app/src/urls.js @@ -1,6 +1,8 @@ let url = new URL(window.location.href); -url.port = "8080"; +// Uncomment this when the web interface is running on a different port than the +// API, for example when using the Vite devserver. Set the API port here. +// url.port = "8080"; url.pathname = "/"; const flamencoAPIURL = url.href;