mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +03:00
Fixing Authorization header with basic auth
The http adapater did not remove a custom Authorization header when auth is set.
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user