Updated socket connection code to support docker
This commit is contained in:
@@ -69,8 +69,7 @@ export function NewTerminal({ hostConfig }) {
|
|||||||
|
|
||||||
// Create socket connection
|
// Create socket connection
|
||||||
const isSecure = window.location.protocol === "https:";
|
const isSecure = window.location.protocol === "https:";
|
||||||
const wsProtocol = isSecure ? "https" : "http";
|
let ioUrl = `${isSecure ? "https" : "http"}://${window.location.hostname}:8081/socket.io/`;
|
||||||
let ioUrl = `${wsProtocol}://${window.location.host}/socket.io/`;
|
|
||||||
|
|
||||||
if(window.location.hostname === "localhost") {
|
if(window.location.hostname === "localhost") {
|
||||||
ioUrl = "http://localhost:8081";
|
ioUrl = "http://localhost:8081";
|
||||||
|
|||||||
Reference in New Issue
Block a user