From 3e9db9c97545c4b14b83497cab86d8fef788b46c Mon Sep 17 00:00:00 2001 From: aliasofsyn Date: Mon, 13 Oct 2025 15:32:33 -0400 Subject: [PATCH] Added trim function on submit for the ipAddress to eliminate any leading or trailing white spaces --- .../components/dashboard/settings/servers/handle-servers.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/dokploy/components/dashboard/settings/servers/handle-servers.tsx b/apps/dokploy/components/dashboard/settings/servers/handle-servers.tsx index a2c9b50a61..9f2176418d 100644 --- a/apps/dokploy/components/dashboard/settings/servers/handle-servers.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/handle-servers.tsx @@ -112,13 +112,14 @@ export const HandleServers = ({ serverId }: Props) => { await mutateAsync({ name: data.name, description: data.description || "", - ipAddress: data.ipAddress || "", + ipAddress: data.ipAddress?.trim() || "", port: data.port || 22, username: data.username || "root", sshKeyId: data.sshKeyId || "", serverId: serverId || "", }) .then(async (_data) => { + console.log("Trimmed IP Address") await utils.server.all.invalidate(); refetchServer(); toast.success(serverId ? "Server Updated" : "Server Created");