mirror of https://github.com/bastienwirtz/homer
fix service traefik with basic auth
parent
c230392da8
commit
9376d473a4
|
@ -42,7 +42,12 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fetchStatus: async function () {
|
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) => {
|
.then((response) => {
|
||||||
this.fetchOk = true;
|
this.fetchOk = true;
|
||||||
this.versionstring = response.Version;
|
this.versionstring = response.Version;
|
||||||
|
|
Loading…
Reference in New Issue