mirror of https://github.com/JustKato/FreePad.git
* Quick protocol fix client-side
This commit is contained in:
parent
a71be11135
commit
5a8ccf20a8
|
@ -31,8 +31,14 @@ class PadSocket {
|
|||
|
||||
// Check if a connection URL was mentioned
|
||||
if ( connUrl == null ) {
|
||||
|
||||
let connProtocol = `ws://`;
|
||||
if ( window.location.protocol == `https:` ) {
|
||||
connProtocol = `wss://`;
|
||||
}
|
||||
|
||||
// Try and connect to the local websocket
|
||||
connUrl = `ws://` + window.location.host + `/ws/get/${padName}`;
|
||||
connUrl = connProtocol + window.location.host + `/ws/get/${padName}`;
|
||||
}
|
||||
|
||||
// Connect to the websocket
|
||||
|
|
Loading…
Reference in New Issue