From cbae3ffbdf2eeb003161f24a523d6018253d5b69 Mon Sep 17 00:00:00 2001 From: ifsheldon <39153080+ifsheldon@users.noreply.github.com> Date: Thu, 22 Jan 2026 15:41:07 +0800 Subject: [PATCH] fix: Handle HTTP redirects in workflow curl requests (#240) * update workflow * fix workflow --- .github/workflows/deploy-cloudflare.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-cloudflare.yml b/.github/workflows/deploy-cloudflare.yml index 5a6fa34..0516b63 100644 --- a/.github/workflows/deploy-cloudflare.yml +++ b/.github/workflows/deploy-cloudflare.yml @@ -181,7 +181,7 @@ jobs: exit 1 fi - HTTP_CODE=$(curl -s -w "%{http_code}" -o response.txt "$WORKER_URL/api/init/${JWT_SECRET}") + HTTP_CODE=$(curl -sL -w "%{http_code}" -o response.txt "$WORKER_URL/api/init/${JWT_SECRET}") RESPONSE_BODY=$(cat response.txt) if [ "$RESPONSE_BODY" = "success" ]; then @@ -198,7 +198,7 @@ jobs: WORKER_URL="${CUSTOM_DOMAIN:-${{ steps.deploy.outputs.worker_url }}}" - HTTP_CODE=$(curl -s -w "%{http_code}" -o response.txt \ + HTTP_CODE=$(curl -sL --post301 --post302 --post303 -w "%{http_code}" -o response.txt \ -X POST \ -H "Content-Type: application/json" \ -d "{\"domainList\": $DOMAIN,\"accountId\":\"$CLOUDFLARE_ACCOUNT_ID\",\"token\":\"$CLOUDFLARE_API_TOKEN\",\"workerName\":\"$NAME\"}" \