Skip to content

[Feature] allowlist of URL patterns #486

Description

@dkarlovi

Expanding on #452 (comment), we just had a case where an URL was (by accident) generated as a full URL, something like

file://localhost/home/me/project/public/thing/index.html

This was caught by Lychee locally, but not on CI, not sure yet what's different.

In general, my proposal is to:

  1. treat all URLs without a hostname as if they're on the --base (and treat it as an offline link), as suggested in Support setting a base for absolute links #452
  2. allow users to specify which URL patterns they allow / expect, so they can keep control of for example outgoing links, etc.

This would allow for catching simple errors link this, but also allow for checking what external links are used (don't link to shady sites), sort of link "link hygiene").

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions