diff --git a/src/io/cluster/nullclusterclient.js b/src/io/cluster/nullclusterclient.js index b320e0d0..b5a83655 100644 --- a/src/io/cluster/nullclusterclient.js +++ b/src/io/cluster/nullclusterclient.js @@ -5,7 +5,11 @@ export default class NullClusterClient { this.ioConfig = ioConfig; } - getSocketURL(channel) { - return Promise.resolve(this.ioConfig.getSocketURL()); + getSocketConfig(channel) { + const url = this.ioConfig.getSocketURL(); + return Promise.resolve({ + url: url, + secure: /^(https|wss)/.test(url) + }); } } diff --git a/src/web/routes/socketconfig.js b/src/web/routes/socketconfig.js index e45437f3..501cb670 100644 --- a/src/web/routes/socketconfig.js +++ b/src/web/routes/socketconfig.js @@ -14,11 +14,8 @@ export default function initialize(app) { }); } - clusterClient.getSocketURL(req.params.channel).then(url => { - res.json({ - url, - secure: /^(https|wss)/.test(url) - }); + clusterClient.getSocketConfig(req.params.channel).then(config => { + res.json(config); }); }); } diff --git a/www/js/callbacks.js b/www/js/callbacks.js index 4e409c59..5c9d1a5a 100644 --- a/www/js/callbacks.js +++ b/www/js/callbacks.js @@ -1111,7 +1111,6 @@ setupCallbacks = function() { $.getJSON("/socketconfig/" + CHANNEL.name + ".json") .done(function (socketConfig) { - console.log(socketConfig); if (socketConfig.error) { makeAlert("Socket.io configuration returned error: " + socketConfig.error, "alert-danger")