diff --git a/src/components/services/Traefik.vue b/src/components/services/Traefik.vue index 9d26bad..6d73779 100644 --- a/src/components/services/Traefik.vue +++ b/src/components/services/Traefik.vue @@ -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;