Skip to content

Commit

Permalink
update readme and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
nfriedly committed Jul 16, 2023
1 parent 73f1c0b commit 9f53d1b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.8.0](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.8.0)

### Changed

- Added a set of validation checks to execute on the first request. (See
[#358](https://github.com/express-rate-limit/express-rate-limit/issues/358))

## [6.7.1](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.7.1)

### Fixed
Expand Down
15 changes: 15 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,21 @@ const limiter = rateLimit({
})
```

### `validation`

> `boolean`
When enabled, a set of validation checks are run on the first request to detect
common misconfigurations with proxies, etc. Prints an error to the console if
any issue is detected.

Automatically disables after the first request is processed.

See https://github.com/express-rate-limit/express-rate-limit/wiki/Error-Codes
for more info.

Defaults to true.

### `store`

> `Store`
Expand Down
2 changes: 1 addition & 1 deletion source/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ const parseOptions = (
_response: Response,
_optionsUsed: Options,
): void {},
// Set the default action to be printing a warning in the console.
// Will print an error to the console if a few known misconfigurations are detected.
validation: true,
// Allow the options object to be overriden by the options passed to the middleware.
...notUndefinedOptions,
Expand Down

0 comments on commit 9f53d1b

Please sign in to comment.