link-check
link-check copied to clipboard
Support for Disabling Redirects
Description
Hi there 👋 This project looks pretty neat, especially from its usage in markdown-lint-check 🎉
We are investigating the possibility of using markdown-lint-check via GitHub Actions to replace some wget link checking we have, but we have an interesting feature request. Currently this library hardcodes the acceptable redirects at (a maximum) of 8:
https://github.com/tcort/link-check/blob/cbcfa7e0cf51ae290d50994a2afd98b7e39af59e/lib/proto/http.js#L22
In our project documentation, we are dealing with an upstream documentation website that will sometimes move pages, but not setup proper redirects (instead all broken links just go to the homepage). Example pull request to fix some of these: https://github.com/terraform-providers/terraform-provider-aws/pull/12803/files
We are thinking that if we could configure the acceptable redirects to 0, then we could alert on those types of broken links.
Proposal
It would be super neat if this library supported configuring maxRedirects (especially to 0 in our case).
Please let me know if you have questions or if I can help contribute. 👍
Please let me know if you have questions or if I can help contribute.
Hi @bflad yes you can contribute of course. If you have an idea about implementing this, you can propose a pull request on this repository.