mirror of https://github.com/bastienwirtz/homer
Merge 187d74995d
into c230392da8
commit
3f7380719a
|
@ -706,11 +706,14 @@ for transcoding on your Tdarr instance as well as the number of errored items.
|
||||||
This service displays a version string instead of a subtitle. Example configuration:
|
This service displays a version string instead of a subtitle. Example configuration:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Traefik
|
- name: "Traefik"
|
||||||
type: Traefik
|
type: "Traefik"
|
||||||
logo: assets/tools/sample.png
|
logo: "assets/tools/sample.png"
|
||||||
url: http://traefik.example.com
|
url: "http://traefik.example.com"
|
||||||
|
basic_auth: "admin:password"
|
||||||
```
|
```
|
||||||
|
- Authentication: If BasicAuth is set, credentials will be encoded in Base64 and sent as an Authorization header (Basic <encoded_value>).
|
||||||
|
- Format: The value must be formatted as "admin:password".
|
||||||
|
|
||||||
## Truenas Scale
|
## Truenas Scale
|
||||||
|
|
||||||
|
|
|
@ -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