Skip to content

Commit dc4bc49

Browse files
xchunzhaoyasuf
authored andcommitted
fix: fix ignore set withCredentials false (axios#2582)
1 parent 13c948e commit dc4bc49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/adapters/xhr.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ module.exports = function xhrAdapter(config) {
129129
}
130130

131131
// Add withCredentials to request if needed
132-
if (config.withCredentials) {
133-
request.withCredentials = true;
132+
if (!utils.isUndefined(config.withCredentials)) {
133+
request.withCredentials = !!config.withCredentials;
134134
}
135135

136136
// Add responseType to request if needed

0 commit comments

Comments
 (0)