mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: add is cloud validation
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user