Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2f0aeec108
commit
ea2c8d2d4d
@ -331,6 +331,8 @@ function prepareHeaders (headers = {}, auth) {
|
||||
} else {
|
||||
headers.authorization = `ApiKey ${auth.apiKey}`
|
||||
}
|
||||
} else if (auth.bearer) {
|
||||
headers.authorization = `Bearer ${auth.bearer}`
|
||||
} else if (auth.username && auth.password) {
|
||||
headers.authorization = 'Basic ' + Buffer.from(`${auth.username}:${auth.password}`).toString('base64')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user