Skip to content

Commit

Permalink
[#25] README modified
Browse files Browse the repository at this point in the history
Redirect configuration explanation added in the FAQ section.
  • Loading branch information
aeqz committed Dec 21, 2022
1 parent fa8ed67 commit 8249893
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 8249893

Please sign in to comment.