2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-21 13:24:11 +03:00

fix(fetch): fix withCredentials request config (#6505)

This commit is contained in:
prianYu
2024-08-01 20:26:06 +08:00
committed by GitHub
parent 92cd8ed943
commit 85d4d0ea0a
+2 -2
View File
@@ -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, {
@@ -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);