Attempt #4 to fix CORS issue and docker build.

This commit is contained in:
Karmaa
2025-02-22 00:59:38 -06:00
parent 5c5fe57dad
commit a9d510aba4
2 changed files with 14 additions and 6 deletions

View File

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