From bb7a71389e3889415de32a8cbb02a841eb1c5f9b Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 29 Jul 2014 22:24:53 -0400 Subject: [PATCH] using websocketAddress config if supplied --- public/src/app.js | 2 +- src/controllers/api.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/src/app.js b/public/src/app.js index 080b1ee7e3..eff176c266 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -100,7 +100,7 @@ var socket, ioParams.transports = ['xhr-polling']; } - socket = io.connect('', ioParams); + socket = io.connect(config.websocketAddress, ioParams); reconnecting = false; socket.on('event:connect', function (data) { diff --git a/src/controllers/api.js b/src/controllers/api.js index 43103eab19..7944fa45f2 100644 --- a/src/controllers/api.js +++ b/src/controllers/api.js @@ -35,6 +35,7 @@ apiController.getConfig = function(req, res, next) { config.disableSocialButtons = parseInt(meta.config.disableSocialButtons, 10) === 1; config.maxReconnectionAttempts = meta.config.maxReconnectionAttempts || 5; config.reconnectionDelay = meta.config.reconnectionDelay || 200; + config.websocketAddress = meta.config.websocketAddress || ''; config.tagsPerTopic = meta.config.tagsPerTopic || 5; config.topicsPerPage = meta.config.topicsPerPage || 20; config.postsPerPage = meta.config.postsPerPage || 20;