Skip to content

Commit

Permalink
Allow extraHeaders to be set for browser clients in XHR requests
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Nov 17, 2016
1 parent 75b7fda commit 62b4ff3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/transports/polling-xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function empty () {}
function XHR (opts) {
Polling.call(this, opts);
this.requestTimeout = opts.requestTimeout;
this.extraHeaders = opts.extraHeaders;

if (global.location) {
var isSSL = 'https:' === location.protocol;
Expand All @@ -44,8 +45,6 @@ function XHR (opts) {
this.xd = opts.hostname !== global.location.hostname ||
port !== opts.port;
this.xs = opts.secure !== isSSL;
} else {
this.extraHeaders = opts.extraHeaders;
}
}

Expand Down

0 comments on commit 62b4ff3

Please sign in to comment.