From 9f676736a04d77f2447beec89d5a48c148071898 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Thu, 20 Jul 2023 15:48:13 -0400 Subject: [PATCH] fix(striker-ui): use full host string instead of hostname when building server VNC url --- striker-ui/components/Display/FullSize.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/striker-ui/components/Display/FullSize.tsx b/striker-ui/components/Display/FullSize.tsx index 18256241..544be304 100644 --- a/striker-ui/components/Display/FullSize.tsx +++ b/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 = ({ onClickCloseButton, @@ -95,7 +95,7 @@ const FullSize: FC = ({ setVncError(false); setRfbConnectArgs({ - url: buildServerVncUrl(window.location.hostname, serverUUID), + url: buildServerVncUrl(window.location.host, serverUUID), }); }, [serverUUID]);