Skip to content

Commit 85d4d0e

Browse files
authored
fix(fetch): fix withCredentials request config (#6505)
1 parent 92cd8ed commit 85d4d0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/adapters/fetch.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export default isFetchSupported && (async (config) => {
155155
}
156156

157157
if (!utils.isString(withCredentials)) {
158-
withCredentials = withCredentials ? 'cors' : 'omit';
158+
withCredentials = withCredentials ? 'include' : 'omit';
159159
}
160160

161161
request = new Request(url, {
@@ -165,7 +165,7 @@ export default isFetchSupported && (async (config) => {
165165
headers: headers.normalize().toJSON(),
166166
body: data,
167167
duplex: "half",
168-
withCredentials
168+
credentials: withCredentials
169169
});
170170

171171
let response = await fetch(request);

0 commit comments

Comments
 (0)