Improvements to URL handling in the webapp allowing for SSL (when behind a proxy) #104296
@ -4,15 +4,10 @@ let url = new URL(window.location.href);
|
|||||||
if (url.port == '8081') {
|
if (url.port == '8081') {
|
||||||
url.port = '8080';
|
url.port = '8080';
|
||||||
}
|
}
|
||||||
url.pathname = '/';
|
|
||||||
const flamencoAPIURL = url.href;
|
|
||||||
|
|
||||||
url.protocol = 'ws:';
|
|
||||||
const websocketURL = url.href;
|
|
||||||
|
|
||||||
const URLs = {
|
const URLs = {
|
||||||
api: flamencoAPIURL,
|
api: `${url.protocol}//${url.hostname}:${url.port}/`,
|
||||||
ws: websocketURL,
|
ws: `${url.protocol.replace('http', 'ws')}//${url.hostname}:${url.port}/`,
|
||||||
};
|
};
|
||||||
|
|
||||||
// console.log("Flamenco API:", URLs.api);
|
// console.log("Flamenco API:", URLs.api);
|
||||||
|
Loading…
Reference in New Issue
Block a user