mirror of
https://github.com/dockur/windows.git
synced 2026-05-06 14:41:24 +00:00
build: Modify curl command to include user-agent
Updated the curl command to include a user-agent string for better compatibility.
This commit is contained in:
parent
6e104b2cf7
commit
07d32b34c0
1 changed files with 2 additions and 3 deletions
5
.github/workflows/links.yml
vendored
5
.github/workflows/links.yml
vendored
|
|
@ -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* ]]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue