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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user