Attempt #3 to fix CORS issue and docker build.

This commit is contained in:
Karmaa
2025-02-22 00:39:34 -06:00
parent 1addd43039
commit 5c5fe57dad
3 changed files with 8 additions and 5 deletions

View File

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

View File

@@ -5,8 +5,9 @@ const SSHClient = require("ssh2").Client;
const server = http.createServer();
const io = socketIo(server, {
cors: {
origin: "*",
methods: ["GET", "POST"]
origin: "*", // Allow all origins
methods: ["*"], // Allow all methods
allowedHeaders: ["*"], // Allow all headers
}
});