Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/XMLHttpRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ exports.XMLHttpRequest = function() {
// Whether cross-site Access-Control requests should be made using
// credentials such as cookies or authorization headers
this.withCredentials = false;
this.rejectUnauthorized = false;

/**
* Private methods
Expand Down Expand Up @@ -378,7 +379,8 @@ exports.XMLHttpRequest = function() {
method: settings.method,
headers: headers,
agent: false,
withCredentials: self.withCredentials
withCredentials: self.withCredentials,
rejectUnauthorized: self.rejectUnauthorized
};

// Reset error flag
Expand Down Expand Up @@ -415,7 +417,8 @@ exports.XMLHttpRequest = function() {
path: url.path,
method: response.statusCode === 303 ? "GET" : settings.method,
headers: headers,
withCredentials: self.withCredentials
withCredentials: self.withCredentials,
rejectUnauthorized: self.rejectUnauthorized
};

// Issue the new request
Expand Down