diff --git a/README.md b/README.md index 73d76c56..99febe1a 100644 --- a/README.md +++ b/README.md @@ -141,10 +141,20 @@ There are several ways to fix this: * This behavior can be disabled by setting `ignoreAuthFailures: false` in the config file. 1. How does `xrefcheck` handle redirects? - * Permanent redirects (i.e. 301 and 308) are reported as errors. - * Temporary redirects (i.e. 302, 303 and 307) are assumed to be valid. - -1. How does `xrefcheck` handle localhost links? + * The default rules are as follows: + * Permanent redirects (i.e. 301 and 308) are reported as errors. + * Temporary redirects (i.e. 302, 303 and 307) are assumed to be valid. + * The redirect rules can be specified with the `externalRefRedirects` within `networking`, which accepts an array of + rules like `{to: "^http://.*", on: temporary, outcome: follow }`. The rule applied is the first one that matches with + the `to` and `on` parameters, if any, where + * `to` is a regular expression as in `ignoreExternalRefsTo` and its absence means that every link + matches. + * `on` accepts `temporary`, `permanent` or a specific redirect HTTP code. Its absence also means that + every response code matches. + * The `outcome` parameter accepts `valid`, `invalid` or `follow`. The last one follows the redirect by applying the + same configuration rules. + +2. How does `xrefcheck` handle localhost links? * By default, `xrefcheck` will ignore links to localhost. * This behavior can be disabled by removing the corresponding entry from the `ignoreExternalRefsTo` list in the config file.