From c986eefeba01ef46a8bb7595a8285ff24986126c Mon Sep 17 00:00:00 2001 From: Slava Kotiya Date: Tue, 12 May 2015 18:10:49 +0200 Subject: [PATCH] fix(client): dynamic protocol for socket.io Look up location.protocol for socket.io, in order to use Karma in https-only enviournment Closes #1400 --- client/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.js b/client/main.js index 11fba2934..23d255f45 100644 --- a/client/main.js +++ b/client/main.js @@ -7,7 +7,7 @@ var KARMA_URL_ROOT = require('./constants').KARMA_URL_ROOT; // connect socket.io // https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO -var socket = io.connect('http://' + location.host, { +var socket = io.connect(location.protocol + '//' + location.host, { 'reconnection delay': 500, 'reconnection limit': 2000, 'resource': KARMA_URL_ROOT.substr(1) + 'socket.io',