Correctly set the credentials
of a fetch request, when the withCredentials
parameter was passed to getDocument
Skimming through https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#Sending_a_request_with_credentials_included, it looks to me like the `credentials` option was accidentally inverted.
This commit is contained in:
parent
a4cc85fc5f
commit
84fe442b35
@ -26,7 +26,7 @@ function createFetchOptions(headers, withCredentials) {
|
||||
method: 'GET',
|
||||
headers,
|
||||
mode: 'cors',
|
||||
credentials: withCredentials ? 'omit' : 'include',
|
||||
credentials: withCredentials ? 'include' : 'omit',
|
||||
redirect: 'follow',
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user