Skip to content

Commit

Permalink
docs: fix broken anchor links for validate config option
Browse files Browse the repository at this point in the history
and clarify the max/limit name
  • Loading branch information
nfriedly committed Nov 15, 2023
1 parent cc25ef0 commit 039b49d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
21 changes: 11 additions & 10 deletions docs/reference/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -338,16 +338,17 @@ const limiter = rateLimit({

Supported validations are:

- [ip](/reference/error-codes#ip)
- [trustProxy](/reference/error-codes#trustProxy)
- [xForwardedForHeader](/reference/error-codes#xForwardedForHeader)
- [positiveHits](/reference/error-codes#positiveHits)
- [singleCount](/reference/error-codes#singleCount)
- [limit](/reference/error-codes#limit)
- [draftPolliHeaders](/reference/error-codes#draftPolliHeaders)
- [onLimitReached](/reference/error-codes#onLimitReached)
- [headersResetTime](/reference/error-codes#headersResetTime)
- [validationsConfig](/reference/error-codes#validationsConfig)
- [ip](/reference/error-codes#err-erl-undefined-ip-address)
- [trustProxy](/reference/error-codes#err-erl-permissive-trust-proxy)
- [xForwardedForHeader](/reference/error-codes#err-erl-unexpected-x-forwarded-for)
- [positiveHits](/reference/error-codes#err-erl-invalid-hits)
- [singleCount](/reference/error-codes#err-erl-double-count)
- [limit](/reference/error-codes#wrn-erl-max-zero) (Note: the `limit` option was
renamed to `max`, but the validation name did not change.)
- [draftPolliHeaders](/reference/error-codes#wrn-erl-deprecated-draft-polli-headers)
- [onLimitReached](/reference/error-codes#wrn-erl-deprecated-on-limit-reached)
- [headersResetTime](/reference/error-codes#err-erl-headers-no-reset)
- [validationsConfig](/reference/error-codes#err-erl-unknown-validation)

Defaults to `true`.

Expand Down
6 changes: 3 additions & 3 deletions docs/reference/error-codes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ Set `validate: {validationsConfig: false}` in the options to disable the check.
> Added in `6.10.0`.
In express-rate-limit version 6 and older, the rate limiter would be disabled
upon passing `max: 0` as part of the options. Starting with version `7.0.0`,
this is no longer the case - the rate limiting will apply from the very first
request instead. See
when setting `limit` (now `max`) to `0` in the options. Starting with version
`7.0.0`, this is no longer the case - the rate limiting will apply from the very
first request instead. See
[#369](https://github.com/express-rate-limit/express-rate-limit/discussions/369)
for more information.

Expand Down

0 comments on commit 039b49d

Please sign in to comment.