The peptide-starter-theme v1.5.2 release added peptide_starter_is_cloudflare_peer() — a CF-peer IP validator that correctly rejects direct-to-origin requests as non-Cloudflare traffic with HTTP 403. The deploy workflow's post-deploy health check makes exactly such a request from a GHA runner IP, so it now reliably receives 403 even on successful deploys. Two deploys today (peptide-starter-theme v1.5.2, prautoblogger Commit 1a) both succeeded but reported workflow failure due to this. The actual deploys (rsync + cache purge) ran clean; site verified HTTP 200 from real traffic both times. Fix: accept either 200 (normal healthy response) or 403 (validator actively rejecting non-CF origin — itself a positive liveness signal) in the health check. Reject only on 5xx, 4xx-other, or connection failure. Reverting this fix is correct only if we either (a) bypass the validator for our own health-check user-agent, or (b) route the health check through Cloudflare. Both are larger changes for a later release. Agent-Session: cowork-deploy-healthcheck-fix-20260415 Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
3.9 KiB
Executable File
3.9 KiB
Executable File