Skip to content

fix: stop external link checker false positives (User-Agent + redirect exclusions) - #596

Merged
yada merged 1 commit into
masterfrom
fix/lychee-external-link-false-positives
Sep 19, 2026
Merged

yada merged 1 commit into
masterfrom
fix/lychee-external-link-false-positives

Conversation

@yada

@yada yada commented Sep 19, 2026

Copy link
Copy Markdown
Member

Description

Fixes #595.

Two changes to .github/workflows/external-link-check.yml and
.lycheeignore:

  1. Swap the external-checker's --user-agent from curl/8.4.0 to a real
    browser UA string. Several sites (podcastaddict.com,
    developers.redhat.com) bot-detect the curl UA and serve a fake
    403/404 to it; with a browser UA they return content normally.
  2. Add .lycheeignore entries for gitter.im and
    insights.lfx.linuxfoundation.org, which fail for reasons lychee's
    HTTP client can't work around even after the UA fix, and are verified
    to load fine in a real browser:
    • gitter.im: fix: replace dead Gitter link with Discord invite in blog post #594 already replaced the non-historical Gitter link
      in the 1.0.0 release post with the Discord invite. The remaining
      gitter.im link in the 1.1.0 release post is intentionally kept
      (historical announcement of the Gitter→Discord move) and 301s to
      app.gitter.im — a redirect lychee won't follow regardless of
      --max-redirects.
    • insights.lfx.linuxfoundation.org: TLS handshake fails for
      lychee's client specifically, confirmed independent of User-Agent.

Verification

Ran the actual lychee binary locally with the workflow's exact flags
against every external link flagged in #584:

  • Before: podcastaddict.com and developers.redhat.com/products/rhel/ubi/
    reported as errors (404).
  • After (UA fix only): both OK, along with openapi.org and the two
    asciinema.org links.
  • After (UA fix + .lycheeignore): the remaining gitter.im link (in the
    1.1.0 release post) and insights.lfx.linuxfoundation.org move from
    Error to Excluded.
  • Confirmed the genuinely broken links (Docker Hub org page,
    barcelonajug.org, the removed YouTube video) are still correctly
    reported as errors — this change does not mask real breakage.

Related issue(s)

Relates to #584

Generated with Claude Code

@yada yada self-assigned this Sep 19, 2026
@yada yada added the github_actions Pull requests that update GitHub Actions code label Sep 19, 2026
Swap the external lychee check's User-Agent from curl/8.4.0 to a real
browser UA string, which several sites (podcastaddict.com,
developers.redhat.com) bot-detect and serve a fake 403/404 to. Add
.lycheeignore entries for gitter.im and insights.lfx.linuxfoundation.org,
which still fail for reasons lychee's HTTP client can't work around even
after the UA fix (an unfollowed redirect and a TLS handshake
incompatibility respectively), both verified to load fine in a real
browser.

Closes #595

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Yacine Kheddache <yacine@microcks.io>
@yada
yada force-pushed the fix/lychee-external-link-false-positives branch from e3c6e88 to 2e5ee8e Compare September 19, 2026 00:22
@yada
yada merged commit 4148f67 into master Sep 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

External link checker reports false positives due to curl User-Agent and unresolvable redirects

1 participant