mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-18 08:48:27 -04:00
Add UA to registry test curl
This commit is contained in:
+1
-1
@@ -280,7 +280,7 @@ run_mods() {
|
|||||||
)"
|
)"
|
||||||
# If we're using lscr try and get the manifest from ghcr, if it fails re-request a token from Docker Hub
|
# If we're using lscr try and get the manifest from ghcr, if it fails re-request a token from Docker Hub
|
||||||
if [[ "${REGISTRY}" == "lscr.io" ]]; then
|
if [[ "${REGISTRY}" == "lscr.io" ]]; then
|
||||||
if [[ -n $(curl -sLH "Authorization: Bearer ${TOKEN}" "${MANIFEST_URL}/${TAG}" | jq -r '.errors' >/dev/null 2>&1) ]]; then
|
if [[ -n $(curl --user-agent "${MOD_UA}" -sLH "Authorization: Bearer ${TOKEN}" "${MANIFEST_URL}/${TAG}" | jq -r '.errors' >/dev/null 2>&1) ]]; then
|
||||||
AUTH_URL="https://auth.docker.io/token?service=registry.docker.io&scope=repository:${ENDPOINT}:pull"
|
AUTH_URL="https://auth.docker.io/token?service=registry.docker.io&scope=repository:${ENDPOINT}:pull"
|
||||||
TOKEN="$(
|
TOKEN="$(
|
||||||
curl -f --retry 10 --retry-max-time 60 --retry-connrefused \
|
curl -f --retry 10 --retry-max-time 60 --retry-connrefused \
|
||||||
|
|||||||
Reference in New Issue
Block a user