From 1098cb106b76ef082e51e2129f552ecc899f64ae Mon Sep 17 00:00:00 2001 From: Ryan Lovett Date: Tue, 17 Apr 2018 23:13:52 -0700 Subject: [PATCH] Optionally read path from cookie Permit a server to set a fallback path to the websocket without altering the URL via query string or hash fragment. The cookie takes least precedence and is named following the convention of the input id in vnc.html. --- vnc_lite.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vnc_lite.html b/vnc_lite.html index 4a96d448..adbc4cc6 100644 --- a/vnc_lite.html +++ b/vnc_lite.html @@ -187,7 +187,11 @@ } var password = WebUtil.getConfigVar('password', ''); - var path = WebUtil.getConfigVar('path', 'websockify'); + + var path = WebUtil.getConfigVar('path', null); + if (!path) { + path = WebUtil.readCookie('noVNC_setting_path', 'websockify'); + } // If a token variable is passed in, set the parameter in a cookie. // This is used by nova-novncproxy.