mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: add conditional to prevent access to terminal when is not server
This commit is contained in:
parent
ee5516bb91
commit
0b22b694e6
@ -38,7 +38,7 @@ export const DockerTerminal: React.FC<Props> = ({
|
||||
|
||||
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
||||
|
||||
const wsUrl = `${protocol}//${window.location.host}/docker-container-terminal?containerId=${containerId}&activeWay=${activeWay}&serverId=${serverId}`;
|
||||
const wsUrl = `${protocol}//${window.location.host}/docker-container-terminal?containerId=${containerId}&activeWay=${activeWay}${serverId ? `&serverId=${serverId}` : ""}`;
|
||||
|
||||
const ws = new WebSocket(wsUrl);
|
||||
|
||||
|
@ -69,8 +69,8 @@ export default function Home({ hasAdmin }: Props) {
|
||||
const router = useRouter();
|
||||
const form = useForm<Login>({
|
||||
defaultValues: {
|
||||
email: "user1@hotmail.com",
|
||||
password: "Password123",
|
||||
email: "",
|
||||
password: "",
|
||||
},
|
||||
resolver: zodResolver(loginSchema),
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user