-
-
Notifications
You must be signed in to change notification settings - Fork 142
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] allowlist of URL patterns #486
Comments
Did you set a Added some comments to #452. |
I did, it's hacking around the missing
IMO, the simplest way is to have a single list with both allow and deny patterns (since they're patterns, they can be negated, think |
We have a |
If we go with a single list, I would vote for |
Before adding anything, though, I would like to know if this is a common enough use-case to warrant a new option. |
Sure, this might be a niche option indeed, but it does make sense to me since you might short-circuit some / all external HTTP requests because they're disallowed by your setup. It's like a difference between XML being valid, syntax vs semantics. Just because the link points to a thing which exists doesn't mean I want it in my docs. IMO it fits nicely with the tool goals, at least IIUC.
Apache solved this with saying which rules are evaluated first with
Agreed, from my POV most (all?) config should be passable via the command line because I might want to override something in the config file (for example, commit config for prod and dev, need an override on CI / test). Since allow and deny are the same thing from a different POV (meaning, Maybe your idea of adding tags to the existing file is the way to go, it's just a matter of finding tokens / syntax which can be safely used. |
As a temporary workaround, you could pass |
@mre that's actually a really nice idea! 💯 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Expanding on #452 (comment), we just had a case where an URL was (by accident) generated as a full URL, something like
This was caught by Lychee locally, but not on CI, not sure yet what's different.
In general, my proposal is to:
--base
(and treat it as an offline link), as suggested in Support setting a base for absolute links #452This 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").
The text was updated successfully, but these errors were encountered: