auto get domain

This commit is contained in:
Cai
2025-10-26 21:39:49 +08:00
parent 9921848d9b
commit b921bda4bc
2 changed files with 6 additions and 6 deletions

View File

@@ -24,7 +24,9 @@
});
});
socket = io('vsc-like',{path:'/vsc-like-ws'});
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
const host = window.location.host;
socket = io(`${protocol}//${host}/vsc-like`, { path: '/vsc-like-ws' });
const status = document.getElementById("status")
socket.on("pty_output", function(data){