fix(striker-ui): use full host string instead of hostname when building server VNC url

main
Tsu-ba-me 1 year ago committed by Yanhao Lei
parent d2a61da663
commit 37f427aa64
  1. 6
      striker-ui/components/Display/FullSize.tsx

@ -42,8 +42,8 @@ const VncDisplay = dynamic(() => import('./VncDisplay'), { ssr: false });
// Unit: seconds
const DEFAULT_VNC_RECONNECT_TIMER_START = 5;
const buildServerVncUrl = (hostname: string, serverUuid: string) =>
`ws://${hostname}/ws/server/vnc/${serverUuid}`;
const buildServerVncUrl = (host: string, serverUuid: string) =>
`ws://${host}/ws/server/vnc/${serverUuid}`;
const FullSize: FC<FullSizeProps> = ({
onClickCloseButton,
@ -95,7 +95,7 @@ const FullSize: FC<FullSizeProps> = ({
setVncError(false);
setRfbConnectArgs({
url: buildServerVncUrl(window.location.hostname, serverUUID),
url: buildServerVncUrl(window.location.host, serverUUID),
});
}, [serverUUID]);

Loading…
Cancel
Save