mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +03:00
Fixing requestHeaders.Authorization (#3287)
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ module.exports = function xhrAdapter(config) {
|
||||
// HTTP basic authentication
|
||||
if (config.auth) {
|
||||
var username = config.auth.username || '';
|
||||
var password = unescape(encodeURIComponent(config.auth.password)) || '';
|
||||
var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
|
||||
requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user