From 329b607634c6bf5588ba0a8b89ebbb5afa163645 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 18 Aug 2020 22:56:16 -0700 Subject: [PATCH] Fixed noVNC on different domains. --- views/default.handlebars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/default.handlebars b/views/default.handlebars index e658a608..e57f0a3a 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -2293,7 +2293,7 @@ newWindow.opener = null; } } else if (message.tag == 'novnc') { - var vncurl = window.location.origin + domainUrl + 'novnc/vnc.html?ws=wss%3A%2F%2F' + window.location.host + '%2Fmeshrelay.ashx%3Fauth%3D' + message.cookie + '&show_dot=1' + (urlargs.key?('&key=' + urlargs.key):'') + '&l={{{lang}}}'; + var vncurl = window.location.origin + domainUrl + 'novnc/vnc.html?ws=wss%3A%2F%2F' + window.location.host + encodeURIComponentEx(domainUrl) + 'meshrelay.ashx%3Fauth%3D' + message.cookie + '&show_dot=1' + (urlargs.key?('&key=' + urlargs.key):'') + '&l={{{lang}}}'; var node = getNodeFromId(message.nodeid); if (node != null) { vncurl += '&name=' + encodeURIComponentEx(node.name); } var newWindow = window.open(vncurl, 'mcnovnc/' + message.nodeid);