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;