mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
fix(fetch): fix withCredentials request config (#6505)
This commit is contained in:
@@ -155,7 +155,7 @@ export default isFetchSupported && (async (config) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!utils.isString(withCredentials)) {
|
if (!utils.isString(withCredentials)) {
|
||||||
withCredentials = withCredentials ? 'cors' : 'omit';
|
withCredentials = withCredentials ? 'include' : 'omit';
|
||||||
}
|
}
|
||||||
|
|
||||||
request = new Request(url, {
|
request = new Request(url, {
|
||||||
@@ -165,7 +165,7 @@ export default isFetchSupported && (async (config) => {
|
|||||||
headers: headers.normalize().toJSON(),
|
headers: headers.normalize().toJSON(),
|
||||||
body: data,
|
body: data,
|
||||||
duplex: "half",
|
duplex: "half",
|
||||||
withCredentials
|
credentials: withCredentials
|
||||||
});
|
});
|
||||||
|
|
||||||
let response = await fetch(request);
|
let response = await fetch(request);
|
||||||
|
|||||||
Reference in New Issue
Block a user