Merge pull request #8848 from Snuffleupagus/fetch-credentials

Correctly set the `credentials` of a fetch request, when the `withCredentials` parameter was passed to `getDocument`
This commit is contained in:
Rob Wu 2017-08-31 14:12:06 +02:00 committed by GitHub
commit 0430e99d16

View File

@ -26,7 +26,7 @@ function createFetchOptions(headers, withCredentials) {
method: 'GET',
headers,
mode: 'cors',
credentials: withCredentials ? 'omit' : 'include',
credentials: withCredentials ? 'include' : 'omit',
redirect: 'follow',
};
}