[DS-361] Pass auth_token from query to websocket proxy

This commit is contained in:
Maciej Zimnoch 2018-10-29 15:26:25 +01:00
parent 56c82ecd35
commit c6d33f430f
1 changed files with 5 additions and 0 deletions

View File

@ -156,6 +156,7 @@
const host = readQueryVariable('host', window.location.hostname);
let port = readQueryVariable('port', window.location.port);
const password = readQueryVariable('password', '');
const authToken = readQueryVariable('auth_token', '');
const path = readQueryVariable('path', 'websockify');
// | | | | | |
@ -177,6 +178,10 @@
}
url += '/' + path;
if (auth_token !== '') {
url += "?auth_token=" + auth_token;
}
// Creating a new RFB object will start a new connection
rfb = new RFB(document.getElementById('screen'), url,
{ credentials: { password: password } });