mirror of
https://github.com/tenrok/axios.git
synced 2026-05-21 13:24:11 +03:00
Add check for withCredentials in XHR adapter (#138)
This commit is contained in:
+1
-1
@@ -88,7 +88,7 @@ module.exports = function xhrAdapter(resolve, reject, config) {
|
||||
var cookies = require('./../helpers/cookies');
|
||||
|
||||
// Add xsrf header
|
||||
var xsrfValue = isURLSameOrigin(config.url) ?
|
||||
var xsrfValue = config.withCredentials || isURLSameOrigin(config.url) ?
|
||||
cookies.read(config.xsrfCookieName || defaults.xsrfCookieName) :
|
||||
undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user