Mixed content exception in web browser in websocket communication on peek behind an https backproxy. (#2571)
"ws://" must be the change to the "wss://" for encryption
This commit is contained in:
parent
961d5591bd
commit
b01309c3bf
@ -1000,7 +1000,7 @@ function reconnectWS() {
|
|||||||
|
|
||||||
function makeWS() {
|
function makeWS() {
|
||||||
if (ws) return;
|
if (ws) return;
|
||||||
ws = new WebSocket('ws://'+(loc?locip:window.location.hostname)+'/ws');
|
ws = new WebSocket((window.location.protocol == 'https:'?'wss':'ws')+'://'+(loc?locip:window.location.hostname)+'/ws');
|
||||||
ws.binaryType = "arraybuffer";
|
ws.binaryType = "arraybuffer";
|
||||||
ws.onmessage = function(event) {
|
ws.onmessage = function(event) {
|
||||||
if (event.data instanceof ArrayBuffer) return; //liveview packet
|
if (event.data instanceof ArrayBuffer) return; //liveview packet
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
ws.send("{'lv':true}");
|
ws.send("{'lv':true}");
|
||||||
} else {
|
} else {
|
||||||
console.info("Peek WS opening");
|
console.info("Peek WS opening");
|
||||||
ws = new WebSocket("ws://"+document.location.host+"/ws");
|
ws = new WebSocket((window.location.protocol == "https:"?"wss":"ws")+"://"+document.location.host+"/ws");
|
||||||
ws.onopen = function () {
|
ws.onopen = function () {
|
||||||
console.info("Peek WS open");
|
console.info("Peek WS open");
|
||||||
ws.send("{'lv':true}");
|
ws.send("{'lv':true}");
|
||||||
|
Loading…
Reference in New Issue
Block a user