From 94e6617638cc75924e36a2f14d53019e1da92834 Mon Sep 17 00:00:00 2001 From: LukeGus Date: Thu, 28 Aug 2025 00:59:20 -0500 Subject: [PATCH] Update Terminal to use new isDev var --- src/ui/apps/Terminal/Terminal.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ui/apps/Terminal/Terminal.tsx b/src/ui/apps/Terminal/Terminal.tsx index 62dc492c..9592bba0 100644 --- a/src/ui/apps/Terminal/Terminal.tsx +++ b/src/ui/apps/Terminal/Terminal.tsx @@ -274,7 +274,11 @@ export const Terminal = forwardRef(function SSHTerminal( const cols = terminal.cols; const rows = terminal.rows; - const wsUrl = import.meta.env.DEV + + const isDev = process.env.NODE_ENV === 'development' && + (window.location.port === '3000' || window.location.port === '5173' || window.location.port === ''); + + const wsUrl = isDev ? 'ws://localhost:8082' : `${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.host}/ssh/websocket/`;