mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
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
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ function createFetchOptions(headers, withCredentials) {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers,
|
headers,
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
credentials: withCredentials ? 'omit' : 'include',
|
credentials: withCredentials ? 'include' : 'omit',
|
||||||
redirect: 'follow',
|
redirect: 'follow',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue