2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-08 17:22:34 +03:00

Merging master

This commit is contained in:
Nick Uraltsev
2016-08-18 20:34:23 -07:00
5 changed files with 53 additions and 4 deletions
+4
View File
@@ -62,6 +62,10 @@ module.exports = function httpAdapter(config) {
auth = urlUsername + ':' + urlPassword;
}
if (auth) {
delete headers.Authorization;
}
var isHttps = parsed.protocol === 'https:';
var agent = isHttps ? config.httpsAgent : config.httpAgent;
+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;