v1.18.x
barisusakli 10 years ago
parent 2423bd18eb
commit 7ec8393004

@ -78,6 +78,7 @@ var socket,
var ioParams = {
reconnectionAttempts: config.maxReconnectionAttempts,
reconnectionDelay : config.reconnectionDelay,
transports: config.socketioTransports,
path: RELATIVE_PATH + '/socket.io'
};

@ -13,6 +13,7 @@ var apiController = {};
apiController.getConfig = function(req, res, next) {
var config = {};
config.relative_path = nconf.get('relative_path');
config.socketioTransports = nconf.get('socketioTransports') || ['websocket', 'polling'];
config.version = pkg.version;
config.siteTitle = meta.config.title || meta.config.browserTitle || 'NodeBB';
config.showSiteTitle = parseInt(meta.config.showSiteTitle, 10) === 1;

@ -36,7 +36,7 @@ Sockets.init = function(server) {
io.on('connection', onConnection);
io.listen(server, {
transports: ['websocket', 'polling']
transports: nconf.get('socketioTransports') || ['websocket', 'polling']
});
Sockets.server = io;

Loading…
Cancel
Save