From 07d32b34c0b36764acdd84d13c9e3f36656b7dfd Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 23 Mar 2026 13:54:26 +0100 Subject: [PATCH] build: Modify curl command to include user-agent Updated the curl command to include a user-agent string for better compatibility. --- .github/workflows/links.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index c4d3062..0c946bb 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -30,10 +30,9 @@ jobs: declare -A seen check() { local url="$1" http - http=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 10 -I -- "$url" 2>&1) || http="000" - printf '%s\n' "HTTP: $http" + http=$(curl -sSL -o /dev/null -w "%{http_code}" --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0)" --max-time 10 -I -- "$url" 2>&1) || http="000" [[ "$http" == 2* ]] && return 0 - http=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000" + http=$(curl -sSL -o /dev/null -w "%{http_code}" --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0)" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000" printf '%s\n' "HTTP: $http" [[ "$http" == 2* ]] }