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

add socketTransportProtocols parameter
This commit is contained in:
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 node_modules
settings.json settings.json
!settings.json.template
APIKEY.txt APIKEY.txt
bin/abiword.exe bin/abiword.exe
bin/node.exe bin/node.exe

View file

@ -91,5 +91,8 @@
*/ */
/* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */ /* 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 // transports in this list at once
// e.g. XHR is disabled in IE by default, so in IE it should use jsonp-polling // 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"); var socketIOLogger = log4js.getLogger("socket.io");
io.set('logger', { io.set('logger', {

View file

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