settings: indexof fix

This commit is contained in:
Manuel Araoz 2014-09-11 09:29:11 -07:00
commit 3aa82c3e8a
2 changed files with 2 additions and 2 deletions

View file

@ -39,7 +39,7 @@ var Insight = function(opts) {
this.opts = {
'reconnection': opts.reconnection || true,
'reconnectionDelay': opts.reconnectionDelay || 1000,
'secure': opts.url.indexOf('https') > -1
'secure': opts.url.indexOf('https') === 0
};
this.socket = this.getSocket();

View file

@ -326,7 +326,7 @@ Network.prototype.createSocket = function() {
return io.connect(this.url, {
reconnection: true,
'force new connection': true,
'secure': this.url.indexOf('https') > -1,
'secure': this.url.indexOf('https') === 0,
});
};