From 23e72aedfd6b81a795ee835793482d337a202dbd Mon Sep 17 00:00:00 2001 From: LukeGus Date: Sun, 24 Aug 2025 00:59:39 -0500 Subject: [PATCH] Migrate to new websocket link for locahlost --- src/ui/apps/Terminal/TerminalComponent.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/apps/Terminal/TerminalComponent.tsx b/src/ui/apps/Terminal/TerminalComponent.tsx index d77ac606..322afa41 100644 --- a/src/ui/apps/Terminal/TerminalComponent.tsx +++ b/src/ui/apps/Terminal/TerminalComponent.tsx @@ -226,7 +226,9 @@ export const TerminalComponent = forwardRef(function SSHT const cols = terminal.cols; const rows = terminal.rows; - const wsUrl = window.location.hostname === 'localhost' ? 'ws://localhost:8082' : `${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.host}/ssh/websocket/`; + const wsUrl = import.meta.env.DEV + ? 'ws://localhost:8082' + : `${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.host}/ssh/websocket/`; const ws = new WebSocket(wsUrl); webSocketRef.current = ws;