2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-11 18:02:32 +03:00

Fixing xsrf header on missing xsrfCookieName

This commit is contained in:
Marco Pracucci
2016-08-08 14:31:11 +02:00
parent 8abe0d4007
commit 85b9015890
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ module.exports = function xhrAdapter(config) {
var cookies = require('./../helpers/cookies');
// Add xsrf header
var xsrfValue = config.withCredentials || isURLSameOrigin(config.url) ?
var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?
cookies.read(config.xsrfCookieName) :
undefined;