improve https detection
This commit is contained in:
parent
fc8d3d8f11
commit
9d01b2306c
@ -13,7 +13,7 @@
|
|||||||
var expectedLocator;
|
var expectedLocator;
|
||||||
if (query.locator) expectedLocator = query.locator;
|
if (query.locator) expectedLocator = query.locator;
|
||||||
|
|
||||||
var protocol = window.location.protocol == 'https' ? 'wss' : 'ws';
|
var protocol = window.location.protocol.match(/https/) ? 'wss' : 'ws';
|
||||||
|
|
||||||
var href = window.location.href;
|
var href = window.location.href;
|
||||||
var index = href.lastIndexOf('/');
|
var index = href.lastIndexOf('/');
|
||||||
|
@ -1526,7 +1526,7 @@ function on_ws_error() {
|
|||||||
var ws;
|
var ws;
|
||||||
|
|
||||||
function open_websocket() {
|
function open_websocket() {
|
||||||
var protocol = window.location.protocol == 'https' ? 'wss' : 'ws';
|
var protocol = window.location.protocol.match(/https/) ? 'wss' : 'ws';
|
||||||
|
|
||||||
var href = window.location.href;
|
var href = window.location.href;
|
||||||
var index = href.lastIndexOf('/');
|
var index = href.lastIndexOf('/');
|
||||||
|
Loading…
Reference in New Issue
Block a user