From 622c098d2a825d4fe63a84f1244db2fc5ea5f0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Pu=C5=A1nik?= Date: Tue, 6 Oct 2015 18:59:42 +0200 Subject: wss --- js/codeq/init.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/codeq/init.js b/js/codeq/init.js index b7e903c..dfd9253 100644 --- a/js/codeq/init.js +++ b/js/codeq/init.js @@ -88,13 +88,14 @@ // we are a web app $(window).on('load', Boot); codeq.ajaxPrefix = location.pathname; - codeq.eioHost= 'ws://' + location.host; + if (location.protocol == 'https:') codeq.eioHost= 'wss://' + location.host; + else codeq.eioHost= 'ws://' + location.host; } else { // we are a phonegap native app document.addEventListener("deviceready", Boot, false); codeq.ajaxPrefix = 'http://codeq.si/'; - codeq.eioHost= 'ws://codeq.si'; + codeq.eioHost= 'wss://codeq.si'; } })(); -- cgit v1.2.1