Skip to content

Commit

Permalink
feat(config): Add forceJSONP option
Browse files Browse the repository at this point in the history
This allows to pass this option to socket.io which is needed to support IE7-9.
  • Loading branch information
dignifiedquire committed Feb 12, 2016
1 parent 932b1cc commit 8627d67
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/config/01-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ will return exit-code `0` and display a warning.

See [config/files] for more information.

## forceJSONP
**Type:** Boolean

**Default:** `false`

**Description:** Force socket.io to use JSONP polling instead of XHR polling.

## frameworks
**Type:** Array
Expand Down
1 change: 1 addition & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ var Config = function () {
this.reportSlowerThan = 0
this.loggers = [constant.CONSOLE_APPENDER]
this.transports = ['polling', 'websocket']
this.forceJSONP = false
this.plugins = ['karma-*']
this.defaultClient = this.client = {
args: [],
Expand Down
3 changes: 2 additions & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ function createSocketIoServer (webServer, executor, config) {
// avoid destroying http upgrades from socket.io to get proxied websockets working
destroyUpgrade: false,
path: config.urlRoot + 'socket.io/',
transports: config.transports
transports: config.transports,
forceJSONP: config.forceJSONP
})

// hack to overcome circular dependency
Expand Down

0 comments on commit 8627d67

Please sign in to comment.