Skip to content

Commit 247fe2b

Browse files
filips123phemavax
authored andcommitted
Support WebSocket connection on HTTPS sites
1 parent a671afe commit 247fe2b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

aquarium/aquarium-common.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,8 @@ function setSetting(elem, id) {
241241
*/
242242
function initializeCommon() {
243243
if (g.net.sync) {
244-
var url = "ws:" + window.location.host;
244+
var protocol = window.location.protocol == "https:" ? "wss:" : "ws:"
245+
var url = protocol + window.location.host;
245246
tdl.log("server:", url);
246247
g_syncManager.init(url, g.net.slave);
247248
if (!g.net.slave) {

0 commit comments

Comments
 (0)