javaterminal / cloudterm

Cloud Web Terminal Emulator. Opens your terminal to Web.
MIT License
78 stars 37 forks source link

url context path not supported - works only if deployed at root path / #10

Open andresoviedo opened 11 months ago

andresoviedo commented 11 months ago

hi, thank you. nice piece of work !

i think i found 1 bug on this line (main branch)

let ws = new WebSocket(`${sec?"wss":"ws"}://${location.host}/${terminal`);

this is my patch to work when the app is not deployed at the root path (e.g. /cloudterm/, /cloudtem/terminal)

 let ws = new WebSocket(`${sec?"wss":"ws"}://${location.host}${location.pathname}terminal`);

i think the solution should be something robust to support the context path

regards