mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-12 09:06:55 -04:00
Fix webclient can't connect to https servers that require secure websockets
This commit is contained in:
parent
771da4cd6e
commit
9965ea5c4e
@ -522,7 +522,9 @@ mergeInto(LibraryManager.library, {
|
|||||||
// create the actual websocket object and connect
|
// create the actual websocket object and connect
|
||||||
try {
|
try {
|
||||||
var parts = addr.split('/');
|
var parts = addr.split('/');
|
||||||
var url = 'ws://' + parts[0] + ":" + port + "/" + parts.slice(1).join('/');
|
var proto = _interop_IsHttpsOnly() ? 'wss://' : 'ws://';
|
||||||
|
var url = proto + parts[0] + ":" + port + "/" + parts.slice(1).join('/');
|
||||||
|
|
||||||
ws = new WebSocket(url, 'ClassiCube');
|
ws = new WebSocket(url, 'ClassiCube');
|
||||||
ws.binaryType = 'arraybuffer';
|
ws.binaryType = 'arraybuffer';
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user