File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1000,7 +1000,7 @@ function reconnectWS() {
10001000
10011001function makeWS ( ) {
10021002 if ( ws ) return ;
1003- ws = new WebSocket ( 'ws ://'+ ( loc ?locip :window . location . hostname ) + '/ws' ) ;
1003+ ws = new WebSocket ( ( window . location . protocol == 'https:' ? 'wss' : 'ws' ) + ' ://'+ ( loc ?locip :window . location . hostname ) + '/ws' ) ;
10041004 ws . binaryType = "arraybuffer" ;
10051005 ws . onmessage = function ( event ) {
10061006 if ( event . data instanceof ArrayBuffer ) return ; //liveview packet
Original file line number Diff line number Diff line change 5151 ws . send ( "{'lv':true}" ) ;
5252 } else {
5353 console . info ( "Peek WS opening" ) ;
54- ws = new WebSocket ( "ws ://"+ document . location . host + "/ws" ) ;
54+ ws = new WebSocket ( ( window . location . protocol == "https:" ? "wss" : "ws" ) + " ://"+ document . location . host + "/ws" ) ;
5555 ws . onopen = function ( ) {
5656 console . info ( "Peek WS open" ) ;
5757 ws . send ( "{'lv':true}" ) ;
You can’t perform that action at this time.
0 commit comments