ci: use browser-style User-Agent for lychee link check#62
Merged
ajbozarth merged 2 commits intoJun 11, 2026
Conversation
Lychee's default User-Agent ('lychee/x.y.z') is rejected with 403 by
some hosts behind bot-detection layers (e.g. Cloudflare-fronted sites),
even when the URLs resolve correctly in a real browser. Set a
Mozilla-compatible UA so lychee presents as a normal client.
Avoids per-host exclusions that silently un-check entire domains
sitewide and keeps the link checker actionable for catching typos and
rotted URLs.
Assisted-by: Claude Code
Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
Collaborator
|
e2e tests appear to be flaking across multiple runs/PRs — not related to this change. Will keep the |
Playwright 1.58.2 hangs in `playwright install chromium` after the download reaches 100% on Node 24.16.0+ due to an extract-zip/yauzl regression (microsoft/playwright#41000). CI's test-e2e job has been timing out at the 6h limit since the runner picked up the new Node. Fixed in Playwright 1.60.0. Assisted-by: Claude Code Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
planetf1
approved these changes
Jun 11, 2026
Merged
via the queue into
generative-computing:main
with commit Jun 11, 2026
ae01a4f
7 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lychee's default User-Agent (
lychee/x.y.z) is rejected with403 Forbiddenby some hosts behind bot-detection layers (Cloudflare-fronted sites in particular), even when the URLs resolve correctly in a real browser. Set a Mozilla-compatible UA so lychee presents as a normal client.This is the alternative to per-host exclusions like
--exclude '.*substack\.com', which silently un-check entire domains sitewide and would let a real broken link slip through unnoticed.Surfaced while reviewing #61 — that PR added a
substack.comexclusion to get its link-check passing. With this change in place, the exclusion can be dropped from #61 and Substack links will be checked normally going forward.Test plan
content/blogs/**/*.md *.md, not just changed files, so this PR's run is a dry run across every existing blog link