diff --git a/js/models/blockchain/Insight.js b/js/models/blockchain/Insight.js index e7da834fc..82d29e81d 100644 --- a/js/models/blockchain/Insight.js +++ b/js/models/blockchain/Insight.js @@ -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(); diff --git a/js/models/network/Async.js b/js/models/network/Async.js index 695e8ae78..869591afe 100644 --- a/js/models/network/Async.js +++ b/js/models/network/Async.js @@ -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, }); };