From 84fe442b35cf113868d5b1bc80db5db5c36ce4cd Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 31 Aug 2017 09:03:22 +0200 Subject: [PATCH] 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. --- src/display/fetch_stream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/display/fetch_stream.js b/src/display/fetch_stream.js index 479225d4f..6bdb6505e 100644 --- a/src/display/fetch_stream.js +++ b/src/display/fetch_stream.js @@ -26,7 +26,7 @@ function createFetchOptions(headers, withCredentials) { method: 'GET', headers, mode: 'cors', - credentials: withCredentials ? 'omit' : 'include', + credentials: withCredentials ? 'include' : 'omit', redirect: 'follow', }; }