Updated dockerfile for new file structure
This commit is contained in:
+2
-2
@@ -20,8 +20,8 @@ http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Proxy WebSocket requests
|
# Proxy WebSocket requests
|
||||||
location /ws/ {
|
location /io/ {
|
||||||
proxy_pass http://localhost:8081; # Backend WebSocket server
|
proxy_pass http://localhost:8081;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection 'upgrade';
|
proxy_set_header Connection 'upgrade';
|
||||||
|
|||||||
+4
-3
@@ -68,10 +68,11 @@ export function NewTerminal({ hostConfig }) {
|
|||||||
terminal.write("\r\n*** Connecting to backend ***\r\n");
|
terminal.write("\r\n*** Connecting to backend ***\r\n");
|
||||||
|
|
||||||
// Create socket connection
|
// Create socket connection
|
||||||
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
const isSecure = window.location.protocol === "https:";
|
||||||
const wsUrl = `${protocol}//${window.location.host}/ws/`;
|
const wsProtocol = isSecure ? "https" : "http";
|
||||||
|
const ioUrl = `${wsProtocol}://${window.location.host}/io/`;
|
||||||
|
|
||||||
const socket = io(wsUrl);
|
const socket = io(ioUrl);
|
||||||
|
|
||||||
// Emit hostConfig to start SSH connection
|
// Emit hostConfig to start SSH connection
|
||||||
socket.on("connect", () => {
|
socket.on("connect", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user