Merge pull request #275 from arabcoders/dev
Fix healthcheck when user:pass are set.
This commit is contained in:
commit
f7f5ef0e59
4 changed files with 13 additions and 6 deletions
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
|
|
@ -24,6 +24,7 @@
|
||||||
"cronsim",
|
"cronsim",
|
||||||
"daterange",
|
"daterange",
|
||||||
"dotenv",
|
"dotenv",
|
||||||
|
"euuo",
|
||||||
"finaldir",
|
"finaldir",
|
||||||
"flac",
|
"flac",
|
||||||
"forcejson",
|
"forcejson",
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,6 @@ class Config:
|
||||||
pictures_backends: list[str] = [
|
pictures_backends: list[str] = [
|
||||||
"https://unsplash.it/1920/1080?random",
|
"https://unsplash.it/1920/1080?random",
|
||||||
"https://picsum.photos/1920/1080",
|
"https://picsum.photos/1920/1080",
|
||||||
"https://spaceholder.cc/i/1920x1080",
|
|
||||||
"https://placedog.net/1920/1080",
|
"https://placedog.net/1920/1080",
|
||||||
]
|
]
|
||||||
"The list of picture backends to use for the background."
|
"The list of picture backends to use for the background."
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euuo pipefail
|
||||||
set -eu pipefail
|
|
||||||
|
|
||||||
LOCAL_PORT="${YTP_PORT:-8081}"
|
LOCAL_PORT="${YTP_PORT:-8081}"
|
||||||
|
|
||||||
/usr/bin/curl -f "http://localhost:${LOCAL_PORT}/api/ping"
|
curl_args=(-f)
|
||||||
|
|
||||||
|
if [[ -n "${YTP_AUTH_USERNAME:-}" && -n "${YTP_AUTH_PASSWORD:-}" ]]; then
|
||||||
|
cred=$(printf '%s:%s' "${YTP_AUTH_USERNAME}" "${YTP_AUTH_PASSWORD}" | base64 | tr -d '\n')
|
||||||
|
curl_args+=(-H "Authorization: Basic ${cred}")
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl_args+=("http://localhost:${LOCAL_PORT}/api/ping")
|
||||||
|
/usr/bin/curl "${curl_args[@]}"
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
<template #popper class="p-0 m-0">
|
<template #popper class="p-0 m-0">
|
||||||
<span class="icon" v-if="!url"><i class="fas fa-circle-notch fa-spin" /></span>
|
<span class="icon" v-if="!url"><i class="fas fa-circle-notch fa-spin" /></span>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div style="width: 25vw; height: auto;" class="m-1">
|
<div style="min-width: 300px; width: 25vw; height: auto;" class="m-1">
|
||||||
<div class="is-block" style="word-break: all;" v-if="props.title">
|
<div class="is-block" style="word-break: all;" v-if="props.title">
|
||||||
<span style="font-size: 120%;">{{ props.title }}</span>
|
<span style="font-size: 120%;">{{ props.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
<figure class="image is-3by1">
|
<figure class="image is-3by1 is-hidden-mobile">
|
||||||
<img @load="e => pImg(e)" :src="url" :alt="props.title" @error="clearCache"
|
<img @load="e => pImg(e)" :src="url" :alt="props.title" @error="clearCache"
|
||||||
:crossorigin="props.privacy ? 'anonymous' : 'use-credentials'"
|
:crossorigin="props.privacy ? 'anonymous' : 'use-credentials'"
|
||||||
:referrerpolicy="props.privacy ? 'no-referrer' : 'origin'" />
|
:referrerpolicy="props.privacy ? 'no-referrer' : 'origin'" />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue