Skip to content

Commit

Permalink
fix(fetch): fix withCredentials request config (#6505)
Browse files Browse the repository at this point in the history
  • Loading branch information
prianyu authored Aug 1, 2024
1 parent 92cd8ed commit 85d4d0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/adapters/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default isFetchSupported && (async (config) => {
}

if (!utils.isString(withCredentials)) {
withCredentials = withCredentials ? 'cors' : 'omit';
withCredentials = withCredentials ? 'include' : 'omit';
}

request = new Request(url, {
Expand All @@ -165,7 +165,7 @@ export default isFetchSupported && (async (config) => {
headers: headers.normalize().toJSON(),
body: data,
duplex: "half",
withCredentials
credentials: withCredentials
});

let response = await fetch(request);
Expand Down

0 comments on commit 85d4d0e

Please sign in to comment.