Fix VNC URL on production builds
This commit is contained in:
parent
32ae92d7aa
commit
c837d70374
@ -338,7 +338,7 @@ export class VMApi {
|
|||||||
let baseWSURL = APIClient.backendURL();
|
let baseWSURL = APIClient.backendURL();
|
||||||
if (!baseWSURL.includes("://"))
|
if (!baseWSURL.includes("://"))
|
||||||
baseWSURL =
|
baseWSURL =
|
||||||
window.location.protocol + "://" + window.location.hostname + baseWSURL;
|
window.location.protocol + "//" + window.location.host + baseWSURL;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
baseWSURL.replace("http", "ws") +
|
baseWSURL.replace("http", "ws") +
|
||||||
|
@ -57,6 +57,7 @@ function VNCInner(p: { vm: VMInfo }): React.ReactElement {
|
|||||||
setToken(undefined);
|
setToken(undefined);
|
||||||
|
|
||||||
const u = await VMApi.OneShotVNCURL(p.vm);
|
const u = await VMApi.OneShotVNCURL(p.vm);
|
||||||
|
console.info("VNC URL", u);
|
||||||
|
|
||||||
if (!token)
|
if (!token)
|
||||||
setToken({
|
setToken({
|
||||||
|
Loading…
Reference in New Issue
Block a user