ApiKey should take precedence over basic auth (#1115)
* ApiKey should take precedence over basic auth * Updated docs * Updated test
This commit is contained in:
committed by
GitHub
parent
6bf04473c9
commit
9a9057db9e
@ -42,13 +42,13 @@ class BaseConnectionPool {
|
||||
opts = this.urlToHost(opts)
|
||||
}
|
||||
|
||||
if (opts.url.username !== '' && opts.url.password !== '') {
|
||||
if (this.auth !== null) {
|
||||
opts.auth = this.auth
|
||||
} else if (opts.url.username !== '' && opts.url.password !== '') {
|
||||
opts.auth = {
|
||||
username: decodeURIComponent(opts.url.username),
|
||||
password: decodeURIComponent(opts.url.password)
|
||||
}
|
||||
} else if (this.auth !== null) {
|
||||
opts.auth = this.auth
|
||||
}
|
||||
|
||||
if (opts.ssl == null) opts.ssl = this._ssl
|
||||
|
||||
Reference in New Issue
Block a user