Fix VNC URL on production builds

This commit is contained in:
Pierre HUBERT 2023-12-12 17:04:19 +01:00
parent 32ae92d7aa
commit c837d70374
2 changed files with 2 additions and 1 deletions

View File

@ -338,7 +338,7 @@ export class VMApi {
let baseWSURL = APIClient.backendURL();
if (!baseWSURL.includes("://"))
baseWSURL =
window.location.protocol + "://" + window.location.hostname + baseWSURL;
window.location.protocol + "//" + window.location.host + baseWSURL;
return (
baseWSURL.replace("http", "ws") +

View File

@ -57,6 +57,7 @@ function VNCInner(p: { vm: VMInfo }): React.ReactElement {
setToken(undefined);
const u = await VMApi.OneShotVNCURL(p.vm);
console.info("VNC URL", u);
if (!token)
setToken({