mirror of
https://github.com/retspen/webvirtcloud
synced 2026-10-18 00:50:07 +00:00
fix(console): fix novncd startup in container and prevent double slashes in websocket url
This commit is contained in:
parent
f061189716
commit
d9112b797f
7 changed files with 64 additions and 15 deletions
|
|
@ -194,7 +194,15 @@
|
|||
if (port) {
|
||||
url += ':' + port;
|
||||
}
|
||||
url += '/' + path;
|
||||
if (path) {
|
||||
url += path.startsWith('/') ? path : ('/' + path);
|
||||
} else {
|
||||
url += '/';
|
||||
}
|
||||
const token = readQueryVariable('token', '{{ token }}');
|
||||
if (token) {
|
||||
url += (url.includes('?') ? '&' : '?') + 'token=' + encodeURIComponent(token);
|
||||
}
|
||||
|
||||
// Creating a new RFB object will start a new connection
|
||||
rfb = new RFB(document.getElementById('noVNC_container'), url,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue