Updated nginx and connection to support local and docker runtime

This commit is contained in:
Karmaa
2025-02-09 20:29:39 -06:00
parent 98a45e9161
commit cb18a0cd87
3 changed files with 7 additions and 5 deletions

View File

@@ -70,7 +70,11 @@ export function NewTerminal({ hostConfig }) {
// Create socket connection
const isSecure = window.location.protocol === "https:";
const wsProtocol = isSecure ? "https" : "http";
const ioUrl = `${wsProtocol}://${window.location.host}/io/`;
let ioUrl = `${wsProtocol}://${window.location.host}/socket.io/`;
if(window.location.hostname === "localhost") {
ioUrl = "http://localhost:8081";
}
const socket = io(ioUrl);