mirror of
https://github.com/bastienwirtz/homer.git
synced 2026-01-22 18:06:11 +00:00
Use consistent auth format with auth field instead of username/password
This commit is contained in:
parent
b821651017
commit
9054bd8941
1 changed files with 2 additions and 2 deletions
|
|
@ -100,8 +100,8 @@ export default {
|
|||
};
|
||||
|
||||
// Add HTTP Basic Auth if credentials are provided
|
||||
if (this.item.username && this.item.password) {
|
||||
const credentials = btoa(`${this.item.username}:${this.item.password}`);
|
||||
if (this.item.auth) {
|
||||
const credentials = btoa(this.item.auth);
|
||||
options.headers["Authorization"] = `Basic ${credentials}`;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue