diff --git a/vnc_auto.html b/vnc_auto.html index 86cfde75..87d21bb7 100644 --- a/vnc_auto.html +++ b/vnc_auto.html @@ -200,16 +200,22 @@ } } + password = WebUtil.getQueryVar('password', ''); + path = WebUtil.getQueryVar('path', 'websockify'); + // If a token variable is passed in, set the parameter in a cookie. // This is used by nova-novncproxy. token = WebUtil.getQueryVar('token', null); if (token) { + + if (path.indexOf("?") > -1) + path += "&token=" + token; //there is a query string already + else + path += "?token=" + token; + WebUtil.createCookie('token', token, 1) } - password = WebUtil.getQueryVar('password', ''); - path = WebUtil.getQueryVar('path', 'websockify'); - if ((!host) || (!port)) { updateState(null, 'fatal', null, 'Must specify host and port in URL'); return;