From 4ce5d5934e222d744165cc08fdae604a798dbba4 Mon Sep 17 00:00:00 2001 From: "B.J. Rossiter" Date: Fri, 6 Dec 2019 08:38:41 +1100 Subject: [PATCH] Allow setting of withCredentials to false (solves #1837) --- lib/adapters/xhr.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/adapters/xhr.js b/lib/adapters/xhr.js index 8c98d114b6..fb5041a178 100644 --- a/lib/adapters/xhr.js +++ b/lib/adapters/xhr.js @@ -123,8 +123,8 @@ module.exports = function xhrAdapter(config) { } // Add withCredentials to request if needed - if (config.withCredentials) { - request.withCredentials = true; + if (!utils.isUndefined(config.withCredentials)) { + request.withCredentials = config.withCredentials; } // Add responseType to request if needed