mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-01-07 17:20:20 +01:00
improve https detection
This commit is contained in:
parent
fc8d3d8f11
commit
9d01b2306c
|
|
@ -13,7 +13,7 @@
|
|||
var expectedLocator;
|
||||
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 index = href.lastIndexOf('/');
|
||||
|
|
|
|||
|
|
@ -1526,7 +1526,7 @@ function on_ws_error() {
|
|||
var ws;
|
||||
|
||||
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 index = href.lastIndexOf('/');
|
||||
|
|
|
|||
Loading…
Reference in a new issue