Skip to content

Commit

Permalink
fix(client): dynamic protocol for socket.io
Browse files Browse the repository at this point in the history
Look up location.protocol for socket.io,
in order to use Karma in https-only enviournment

Closes #1400
  • Loading branch information
Slava Kotiya committed May 14, 2015
1 parent a8bbdda commit c986eef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit c986eef

Please sign in to comment.