mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 18:16:17 +01:00
closes #2532
This commit is contained in:
@@ -78,6 +78,7 @@ var socket,
|
|||||||
var ioParams = {
|
var ioParams = {
|
||||||
reconnectionAttempts: config.maxReconnectionAttempts,
|
reconnectionAttempts: config.maxReconnectionAttempts,
|
||||||
reconnectionDelay : config.reconnectionDelay,
|
reconnectionDelay : config.reconnectionDelay,
|
||||||
|
transports: config.socketioTransports,
|
||||||
path: RELATIVE_PATH + '/socket.io'
|
path: RELATIVE_PATH + '/socket.io'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ var apiController = {};
|
|||||||
apiController.getConfig = function(req, res, next) {
|
apiController.getConfig = function(req, res, next) {
|
||||||
var config = {};
|
var config = {};
|
||||||
config.relative_path = nconf.get('relative_path');
|
config.relative_path = nconf.get('relative_path');
|
||||||
|
config.socketioTransports = nconf.get('socketioTransports') || ['websocket', 'polling'];
|
||||||
config.version = pkg.version;
|
config.version = pkg.version;
|
||||||
config.siteTitle = meta.config.title || meta.config.browserTitle || 'NodeBB';
|
config.siteTitle = meta.config.title || meta.config.browserTitle || 'NodeBB';
|
||||||
config.showSiteTitle = parseInt(meta.config.showSiteTitle, 10) === 1;
|
config.showSiteTitle = parseInt(meta.config.showSiteTitle, 10) === 1;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ Sockets.init = function(server) {
|
|||||||
io.on('connection', onConnection);
|
io.on('connection', onConnection);
|
||||||
|
|
||||||
io.listen(server, {
|
io.listen(server, {
|
||||||
transports: ['websocket', 'polling']
|
transports: nconf.get('socketioTransports') || ['websocket', 'polling']
|
||||||
});
|
});
|
||||||
|
|
||||||
Sockets.server = io;
|
Sockets.server = io;
|
||||||
|
|||||||
Reference in New Issue
Block a user