diff --git a/core/client.js b/core/client.js index 5e2f66e7..21395088 100644 --- a/core/client.js +++ b/core/client.js @@ -423,7 +423,8 @@ $(document).ready(function() { window.addEventListener("message", onMessage, false); enableDragDrop(); - gSocket = new WebSocket("ws://" + gSocket = new WebSocket( + (window.location.protocol == "https:" ? "wss://" : "ws://") + window.location.hostname + (window.location.port.length ? ":" + window.location.port : "") + "/terminal/socket");