mirror of
https://github.com/dockur/windows.git
synced 2026-04-20 21:40:57 +01:00
build: Use Firefox impersonation while checking links (#1681)
This commit is contained in:
7
.github/workflows/links.yml
vendored
7
.github/workflows/links.yml
vendored
@@ -28,11 +28,14 @@ jobs:
|
||||
count=0
|
||||
host=""
|
||||
declare -A seen
|
||||
wget https://github.com/lwthiker/curl-impersonate/releases/download/v0.6.1/curl-impersonate-v0.6.1.x86_64-linux-gnu.tar.gz
|
||||
tar -xzf curl-impersonate-v0.6.1.x86_64-linux-gnu.tar.gz
|
||||
sudo cp curl-impersonate-ff /usr/local/bin/
|
||||
check() {
|
||||
local url="$1" http
|
||||
http=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 10 -I -- "$url" 2>&1) || http="000"
|
||||
http=$(curl-impersonate-ff -sSL -o /dev/null -w "%{http_code}" --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-impersonate-ff -sSL -o /dev/null -w "%{http_code}" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000"
|
||||
[[ "$http" == 2* ]]
|
||||
}
|
||||
while IFS= read -r line; do
|
||||
|
||||
Reference in New Issue
Block a user