From 5584fec83113a4cafec05265db7d2665d4c09b24 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 17 Jun 2019 10:49:25 +0800 Subject: [PATCH] vnc --- public/react/src/modules/page/VNCDisplay.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/page/VNCDisplay.js b/public/react/src/modules/page/VNCDisplay.js index e6dff2f4..1e443ed1 100644 --- a/public/react/src/modules/page/VNCDisplay.js +++ b/public/react/src/modules/page/VNCDisplay.js @@ -88,11 +88,11 @@ class VNCDisplay extends Component { status("Connecting"); // Build the websocket URL used to connect let url; - // if (window.location.protocol === "https:") { - // url = 'wss'; - // } else { + if (vnc_url.indexOf("https:") != -1) { + url = 'wss'; + } else { url = 'ws'; - // } + } url += '://' + host; if(port) { url += ':' + port;