2022-05-31 17:05:27 +00:00
|
|
|
############################# Display #############################
|
|
|
|
|
|
2020-10-21 00:10:25 +00:00
|
|
|
# Verbose program output
|
2023-02-28 21:51:20 +00:00
|
|
|
# Accepts log level: "error", "warn", "info", "debug", "trace"
|
|
|
|
|
verbose = "info"
|
2020-10-21 00:10:25 +00:00
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# Don't show interactive progress bar while checking links.
|
|
|
|
|
no_progress = false
|
|
|
|
|
|
|
|
|
|
# Path to summary output file.
|
2023-03-01 21:00:31 +00:00
|
|
|
output = ".config.dummy.report.md"
|
2022-05-31 17:05:27 +00:00
|
|
|
|
|
|
|
|
############################# Cache ###############################
|
|
|
|
|
|
|
|
|
|
# Enable link caching. This can be helpful to avoid checking the same links on
|
|
|
|
|
# multiple runs.
|
|
|
|
|
cache = true
|
2020-10-21 00:10:25 +00:00
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# Discard all cached requests older than this duration.
|
2022-05-31 17:43:46 +00:00
|
|
|
max_cache_age = "2d"
|
2022-05-31 17:05:27 +00:00
|
|
|
|
|
|
|
|
############################# Runtime #############################
|
2020-10-21 00:10:25 +00:00
|
|
|
|
|
|
|
|
# Number of threads to utilize.
|
|
|
|
|
# Defaults to number of cores available to the system if omitted.
|
2022-05-31 17:05:27 +00:00
|
|
|
threads = 2
|
2020-10-21 00:10:25 +00:00
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# Maximum number of allowed redirects.
|
2020-10-21 00:10:25 +00:00
|
|
|
max_redirects = 10
|
|
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# Maximum number of allowed retries before a link is declared dead.
|
|
|
|
|
max_retries = 2
|
|
|
|
|
|
|
|
|
|
# Maximum number of concurrent link checks.
|
|
|
|
|
max_concurrency = 14
|
2020-10-21 00:10:25 +00:00
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
############################# Requests ############################
|
2020-10-21 00:10:25 +00:00
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# User agent to send with each request.
|
|
|
|
|
user_agent = "curl/7.83. 1"
|
|
|
|
|
|
|
|
|
|
# Website timeout from connect to response finished.
|
2021-04-04 14:59:22 +00:00
|
|
|
timeout = 20
|
2020-10-21 00:10:25 +00:00
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# Minimum wait time in seconds between retries of failed requests.
|
|
|
|
|
retry_wait_time = 2
|
|
|
|
|
|
2020-10-21 00:10:25 +00:00
|
|
|
# Comma-separated list of accepted status codes for valid links.
|
feat: Add support for ranges in the `--accept` option / config field (#1167)
Adds support for accept ranges discussed in #1157. This allows the user to specify custom HTTP status codes accepted during checking and thus will report as valid (not broken). The accept option only supports specifying status codes as a comma-separated list. With this PR, the option will accept a list of status code ranges formatted like this:
```toml
accept = ["100..=103", "200..=299", "403"]
```
These combinations will be supported: `..<end>`, ` ..=<end>`, `<start>..<end>` and `<start>..=<end>`.
The behavior is copied from the Rust Range like concepts:
```
..<end>, includes 0 to <end> (exclusive)
..=<end>, includes 0 to <end> (inclusive)
<start>..<end>, includes <start> to <end> (exclusive)
<start>..=<end>, includes <start> to <end> (inclusive)
```
- Foundation and enhancements for accept ranges, including support for comma-separated strings and integration into the CLI.
- Implementations and updates for AcceptSelector, including Default, Display, and serde defaults.
- Address and fix various errors: clippy, cargo fmt, and tests.
- Add more tests, address edge cases, and enhance error messaging, especially for TOML config parsing.
- Update dependencies.
2023-09-17 19:39:01 +00:00
|
|
|
# Supported values are:
|
|
|
|
|
#
|
|
|
|
|
# accept = ["200..=204", "429"]
|
|
|
|
|
# accept = "200..=204, 429"
|
|
|
|
|
# accept = ["200", "429"]
|
|
|
|
|
# accept = "200, 429"
|
|
|
|
|
accept = ["200", "429"]
|
2020-10-21 00:10:25 +00:00
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# Proceed for server connections considered insecure (invalid TLS).
|
2020-10-21 00:10:25 +00:00
|
|
|
insecure = false
|
|
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# Only test links with the given schemes (e.g. https).
|
2023-09-14 23:27:44 +00:00
|
|
|
# Omit to check links with any other scheme.
|
|
|
|
|
# At the moment, we support http, https, file, and mailto.
|
|
|
|
|
scheme = ["https"]
|
2022-05-31 17:05:27 +00:00
|
|
|
|
|
|
|
|
# When links are available using HTTPS, treat HTTP links as errors.
|
|
|
|
|
require_https = false
|
2020-10-21 00:10:25 +00:00
|
|
|
|
|
|
|
|
# Request method
|
|
|
|
|
method = "get"
|
|
|
|
|
|
|
|
|
|
# Custom request headers
|
2025-05-23 11:37:32 +00:00
|
|
|
header = { "accept" = "text/html", "x-custom-header" = "value" }
|
2020-10-21 00:10:25 +00:00
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# Remap URI matching pattern to different URI.
|
2023-09-14 23:27:44 +00:00
|
|
|
remap = ["https://example.com http://example.invalid"]
|
2022-05-31 17:05:27 +00:00
|
|
|
|
2025-07-09 22:03:51 +00:00
|
|
|
# Fallback extensions to apply when a URL does not specify one.
|
|
|
|
|
# This is common in documentation tools that cross-reference files without extensions.
|
|
|
|
|
fallback_extensions = ["md", "html"]
|
|
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# Base URL or website root directory to check relative URLs.
|
2025-02-16 00:41:32 +00:00
|
|
|
base_url = "https://example.com"
|
2022-05-31 17:05:27 +00:00
|
|
|
|
2025-06-21 18:59:34 +00:00
|
|
|
# Root path to use when checking absolute local links, must be an absolute path
|
|
|
|
|
root_dir = "/dist"
|
|
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# HTTP basic auth support. This will be the username and password passed to the
|
|
|
|
|
# authorization HTTP header. See
|
|
|
|
|
# <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization>
|
2023-06-26 10:06:24 +00:00
|
|
|
basic_auth = ["example.com user:pwd"]
|
2022-05-31 17:05:27 +00:00
|
|
|
|
2025-06-21 18:59:34 +00:00
|
|
|
# Enable the checking of fragments in links.
|
|
|
|
|
include_fragments = true
|
|
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
############################# Exclusions ##########################
|
|
|
|
|
|
|
|
|
|
# Skip missing input files (default is to error if they don't exist).
|
|
|
|
|
skip_missing = false
|
|
|
|
|
|
|
|
|
|
# Check links inside `<code>` and `<pre>` blocks as well as Markdown code
|
|
|
|
|
# blocks.
|
|
|
|
|
include_verbatim = false
|
|
|
|
|
|
|
|
|
|
# Ignore case of paths when matching glob patterns.
|
|
|
|
|
glob_ignore_case = false
|
2020-10-21 00:10:25 +00:00
|
|
|
|
2025-07-11 08:00:57 +00:00
|
|
|
# Exclude URLs and mail addresses from checking. The values are treated as regular expressions
|
2025-07-11 17:08:06 +00:00
|
|
|
exclude = [
|
|
|
|
|
'^https://example\.com/home$', # specific URL
|
|
|
|
|
'^https?://example\.com', # match both HTTP and HTTPS
|
|
|
|
|
'^https://(www\.)?linkedin\.com', # optional subdomains
|
|
|
|
|
'^https://(.*\.)?github(usercontent)?\.(com|io)', # exclude common GitHub URLs
|
|
|
|
|
]
|
2020-10-21 00:10:25 +00:00
|
|
|
|
2025-07-11 08:00:57 +00:00
|
|
|
# Exclude paths from getting checked. The values are treated as regular expressions
|
2025-07-11 17:08:06 +00:00
|
|
|
exclude_path = [
|
|
|
|
|
"\\.txt$", # skip .txt extensions
|
|
|
|
|
"(^|/)test/", # skip directories named "test"
|
|
|
|
|
"[aeiouAEIOU]", # exclude paths containing vowels
|
|
|
|
|
]
|
2021-09-01 15:37:31 +00:00
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# URLs to check (supports regex). Has preference over all excludes.
|
2023-09-14 23:27:44 +00:00
|
|
|
include = ['gist\.github\.com.*']
|
2020-10-25 12:41:06 +00:00
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# Exclude all private IPs from checking.
|
|
|
|
|
# Equivalent to setting `exclude_private`, `exclude_link_local`, and
|
|
|
|
|
# `exclude_loopback` to true.
|
2020-10-21 00:10:25 +00:00
|
|
|
exclude_all_private = false
|
|
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# Exclude private IP address ranges from checking.
|
2020-10-21 00:10:25 +00:00
|
|
|
exclude_private = false
|
|
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# Exclude link-local IP address range from checking.
|
2020-10-21 00:10:25 +00:00
|
|
|
exclude_link_local = false
|
|
|
|
|
|
2022-05-31 17:05:27 +00:00
|
|
|
# Exclude loopback IP address range and localhost from checking.
|
2020-10-21 00:10:25 +00:00
|
|
|
exclude_loopback = false
|
2021-04-04 14:59:22 +00:00
|
|
|
|
2023-07-19 17:58:38 +00:00
|
|
|
# Check mail addresses
|
|
|
|
|
include_mail = true
|