mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
Merging master
This commit is contained in:
@@ -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
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user