mirror of
https://github.com/bastienwirtz/homer.git
synced 2025-10-26 07:46:19 +01:00
fix service traefik with basic auth
This commit is contained in:
committed by
Bastien Wirtz
parent
5eaa479b3c
commit
ee152fd202
@@ -42,7 +42,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
fetchStatus: async function () {
|
||||
this.fetch("/api/version")
|
||||
let headers = {};
|
||||
if (this.item.basic_auth) {
|
||||
const encodedCredentials = btoa(this.item.basic_auth);
|
||||
headers["Authorization"] = `Basic ${encodedCredentials}`;
|
||||
}
|
||||
this.fetch("/api/version", { headers })
|
||||
.then((response) => {
|
||||
this.fetchOk = true;
|
||||
this.versionstring = response.Version;
|
||||
|
||||
Reference in New Issue
Block a user