Skip to content

Self-hosted, plugin-based server management.

Migrate to new websocket link for locahlost

LukeGus23e72aedfd6b
diff --git a/src/ui/apps/Terminal/TerminalComponent.tsx b/src/ui/apps/Terminal/TerminalComponent.tsx
index d77ac6064..322afa415 100644
--- a/src/ui/apps/Terminal/TerminalComponent.tsx
+++ b/src/ui/apps/Terminal/TerminalComponent.tsx
@@ -226,7 +226,9 @@ export const TerminalComponent = forwardRef<any, SSHTerminalProps>(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;