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* ]] }