fix service traefik with basic auth

pull/948/head
3thibaut1304 2025-07-02 12:56:04 +02:00
parent c230392da8
commit 9376d473a4
1 changed files with 6 additions and 1 deletions

View File

@ -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;