diff --git a/Dockerfile b/Dockerfile index 62d749ec..1b155532 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python -ENV VER=${VER:-relpath} \ +ENV VER=${VER:-master} \ REPO=https://github.com/twhtanghk/noVNC \ APP=/usr/src/app diff --git a/core/rfb.js b/core/rfb.js index ece0f008..5aa5a1db 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -392,7 +392,10 @@ RFB.prototype = { uri = this._encrypt ? 'wss' : 'ws'; } - uri += '://' + this._rfb_host + ':' + this._rfb_port + '/' + this._rfb_path; + var relpath = location.pathname.split('/'); + relpath.splice(1, -1); + relpath = relpath.join('/') + '/'; + uri += '://' + this._rfb_host + ':' + this._rfb_port + relpath + this._rfb_path; Log.Info("connecting to " + uri); try {