Skip to content
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

Add an option to ignore domains #151

Open
alexppg opened this issue Aug 27, 2020 · 2 comments
Open

Add an option to ignore domains #151

alexppg opened this issue Aug 27, 2020 · 2 comments
Assignees
Labels

Comments

@alexppg
Copy link

alexppg commented Aug 27, 2020

Is your feature request related to a problem? Please describe.
If a domain goes down for whatever reason and you dont't want/can't update the urls, you have to add all the urls to the configuration file.

Describe the solution you'd like
It would be a lot easier if you could just have a list of domains to ignore.

Describe alternatives you've considered
Adding the urls manually can make it work, but you'll may end with a config file of hundreds of lines.

@Simran-B
Copy link

IgnoreURLs - Array of regexs of URLs to ignore.

Since it accepts regular expressions, this is already possible, e.g.:

IgnoreURLs:
  - ^https?://(www\.)?example\.org\b

The above regex should match all of the following URLs:

  • http://www.example.org
  • https://www.example.org
  • http://example.org
  • https://example.org
  • http://www.example.org/foo/bar
  • https://www.example.org/whatever/path.html?ts=1234&submit=true
  • ...

@wjdp
Copy link
Owner

wjdp commented Jan 14, 2021

You don't technically need regex for this but the result isn't as good. If you don't want to check example123.com. This will match all links containing that string:

IgnoreURLs:
  - example123.com
  • http://example123.com
  • https://example123.com/abc
  • https://anothersite.test/example123.com ← perhaps not ideal

You could add a scheme but that would ignore a url like https://anothersite.test/https://example123.com which you'd probably want to catch using an HTML tester.

The docs aren't very clear on this point. I'll update them with @Simran-B 's solution. I'm tempted to add an IgnoreDomains setting which does the legwork for you though.

@wjdp wjdp self-assigned this Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants