Skip to content

Commit c986eef

Browse files
author
Slava Kotiya
committed
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
1 parent a8bbdda commit c986eef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var KARMA_URL_ROOT = require('./constants').KARMA_URL_ROOT;
77

88
// connect socket.io
99
// https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO
10-
var socket = io.connect('http://' + location.host, {
10+
var socket = io.connect(location.protocol + '//' + location.host, {
1111
'reconnection delay': 500,
1212
'reconnection limit': 2000,
1313
'resource': KARMA_URL_ROOT.substr(1) + 'socket.io',

0 commit comments

Comments
 (0)