From 2dc5b6e4bfe62f809b3bfde9550b21a9aa6e338f Mon Sep 17 00:00:00 2001 From: Dhruvdutt Jadhav Date: Fri, 28 Aug 2020 19:58:11 +0530 Subject: [PATCH] fix: default credentials to same-site --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 39f523b..2887773 100644 --- a/src/index.js +++ b/src/index.js @@ -195,7 +195,7 @@ export default (function create(/** @type {Options} */ defaults) { method: _method || options.method, body: data, headers: deepMerge(options.headers, customHeaders, true), - credentials: options.withCredentials ? 'include' : undefined + credentials: options.withCredentials ? 'include' : 'same-origin' }).then((res) => { for (const i in res) { if (typeof res[i] != 'function') response[i] = res[i];