Skip to content

Commit 848cacb

Browse files
committed
Update doc for basic rate limiter whitelist (specific IPs only) + fix minor orthograph
1 parent d059d2b commit 848cacb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/content/3.middleware/1.rate-limiter.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ type RateLimiter = {
5656
tokensPerInterval: number;
5757
interval: number;
5858
headers: boolean;
59+
whiteList: string[];
5960
throwError: boolean;
6061
driver: {
6162
name: string;
@@ -82,11 +83,17 @@ The time value in miliseconds after which the rate limiting will be reset. For e
8283

8384
When set to `true` it will set the response headers: `X-Ratelimit-Remaining`, `X-Ratelimit-Reset`, `X-Ratelimit-Limit` with appriopriate values.
8485

86+
### `whiteList`
87+
88+
- Default: `undefined`
89+
90+
When set to `['127.0.0.1', '192.168.0.1']` it will skip rate limiting for these specific IPs.
91+
8592
### `throwError`
8693

8794
- Default: `true`
8895

89-
Whether to throw Nuxt Error with appriopriate error code and message. If set to false, it will just return the object with the error that you can handle.
96+
Whether to throw Nuxt Error with appropriate error code and message. If set to false, it will just return the object with the error that you can handle.
9097

9198
### `driver`
9299

0 commit comments

Comments
 (0)