diff --git a/docs/config/01-configuration-file.md b/docs/config/01-configuration-file.md index 12ad16e21..ca24a1cdf 100644 --- a/docs/config/01-configuration-file.md +++ b/docs/config/01-configuration-file.md @@ -227,6 +227,14 @@ If `true`, it captures browsers, runs tests and exits with `0` exit code (if all `1` exit code (if any test failed). +## transports +**Type:** Array + +**Default:** `['websocket', 'flashsocket', 'xhr-polling', 'jsonp-polling']` + +**Description:** An array of allowed transport methods between the server and the client. This is configuration of [socket.io](https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO). + + ## urlRoot **Type:** String diff --git a/lib/config.js b/lib/config.js index 377acf7f1..d0c0f5fce 100644 --- a/lib/config.js +++ b/lib/config.js @@ -258,6 +258,7 @@ var parseConfig = function(configFilePath, cliOptions) { dir: 'coverage/' }, loggers: [ constant.CONSOLE_APPENDER ], + transports: [ 'websocket', 'flashsocket', 'xhr-polling', 'jsonp-polling' ], plugins: [ 'karma-*' ] }; var dsl = new KarmaDsl(config); diff --git a/lib/server.js b/lib/server.js index 6470971fd..6373f0a3a 100644 --- a/lib/server.js +++ b/lib/server.js @@ -40,7 +40,7 @@ var start = function(injector, config, launcher, globalEmitter, preprocess, file var socketServer = io.listen(webServer, { logger: logger.create('socket.io', constant.LOG_ERROR), resource: config.urlRoot + 'socket.io', - transports: ['websocket', 'flashsocket', 'xhr-polling', 'jsonp-polling'] + transports: config.transports }); webServer.updateFilesPromise(filesPromise);