Improvements to URL handling in the webapp allowing for SSL (when behind a proxy) #104296

Merged
Sybren A. Stüvel merged 5 commits from william-at-counter/flamenco:main into main 2024-04-11 15:00:55 +02:00
Showing only changes of commit 5755fab6b0 - Show all commits

View File

@ -1,6 +1,8 @@
let url = new URL(window.location.href);
// When using Vite development mode, access the API on port 8080.
// When the web interface is running on a different port than the API, for
william-at-counter marked this conversation as resolved Outdated

The new comment doesn't explain why this piece of code is there to begin with. Please do keep the explanation that when using Vite in dev mode, the web app runs on a different port than the API.

The new comment doesn't explain why this piece of code is there to begin with. Please do keep the explanation that when using Vite in dev mode, the web app runs on a different port than the API.
// example when using the Vite devserver, setting the Vite --mode flag to
// "development" will force port 8080 for the API.
if (import.meta.env.MODE == 'development') {
url.port = '8080';
}