Merge pull request #1244 from Wikinaut/add-socketio-transport-protocol-parameter

add socketTransportProtocols parameter
pull/1279/merge
John McLear 2012-12-10 15:15:05 -08:00
commit a5965bcdb5
4 changed files with 12 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
node_modules
settings.json
!settings.json.template
APIKEY.txt
bin/abiword.exe
bin/node.exe

View File

@ -91,5 +91,8 @@
*/
/* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */
"loglevel": "INFO"
"loglevel": "INFO",
// restrict socket.io transport methods
"socketTransportProtocols" : ['xhr-polling', 'jsonp-polling', 'htmlfile']
}

View File

@ -36,10 +36,10 @@ exports.expressCreateServer = function (hook_name, args, cb) {
});
});
// there shouldn#t be a browser that isn't compatible to all
// there shouldn't be a browser that isn't compatible to all
// transports in this list at once
// e.g. XHR is disabled in IE by default, so in IE it should use jsonp-polling
io.set('transports', ['xhr-polling', 'jsonp-polling', 'htmlfile']);
io.set('transports', settings.socketTransportProtocols );
var socketIOLogger = log4js.getLogger("socket.io");
io.set('logger', {

View File

@ -57,6 +57,11 @@ exports.port = process.env.PORT || 9001;
*/
exports.ssl = false;
/**
* socket.io transport methods
**/
exports.socketTransportProtocols = ['xhr-polling', 'jsonp-polling', 'htmlfile'];
/*
* The Type of the database
*/