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.
This commit is contained in:
Sybren A. Stüvel 2022-06-28 10:30:26 +02:00
parent d6cfff4031
commit e9bc55cfc8

View File

@ -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;