From 75e0d0ba78fb187fbae99ac737e2c57f30a89d42 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 29 Dec 2024 18:14:32 -0600 Subject: [PATCH] refactor: add is cloud validation --- apps/dokploy/server/wss/terminal.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/dokploy/server/wss/terminal.ts b/apps/dokploy/server/wss/terminal.ts index 7b08893c..8c661c8a 100644 --- a/apps/dokploy/server/wss/terminal.ts +++ b/apps/dokploy/server/wss/terminal.ts @@ -1,5 +1,9 @@ import type http from "node:http"; -import { findServerById, validateWebSocketRequest } from "@dokploy/server"; +import { + findServerById, + IS_CLOUD, + validateWebSocketRequest, +} from "@dokploy/server"; import { publicIpv4, publicIpv6 } from "public-ip"; import { Client, type ConnectConfig } from "ssh2"; import { WebSocketServer } from "ws"; @@ -60,7 +64,7 @@ export const setupTerminalWebSocketServer = ( const isLocalServer = serverId === "local"; - if (isLocalServer) { + if (isLocalServer && !IS_CLOUD) { const port = Number(url.searchParams.get("port")); const username = url.searchParams.get("username");