From f2918e02f63ee9f37a33f8b63f5e1f8044f8eb4f Mon Sep 17 00:00:00 2001 From: Karmaa Date: Sun, 9 Feb 2025 21:07:09 -0600 Subject: [PATCH] Updated socket connection code to support docker --- src/Terminal.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Terminal.jsx b/src/Terminal.jsx index 525c6237..463c20b0 100644 --- a/src/Terminal.jsx +++ b/src/Terminal.jsx @@ -69,8 +69,7 @@ export function NewTerminal({ hostConfig }) { // Create socket connection const isSecure = window.location.protocol === "https:"; - const wsProtocol = isSecure ? "https" : "http"; - let ioUrl = `${wsProtocol}://${window.location.host}/socket.io/`; + let ioUrl = `${isSecure ? "https" : "http"}://${window.location.hostname}:8081/socket.io/`; if(window.location.hostname === "localhost") { ioUrl = "http://localhost:8081";