You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/content/3.middleware/1.rate-limiter.md
+8-1
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,7 @@ type RateLimiter = {
56
56
tokensPerInterval:number;
57
57
interval:number;
58
58
headers:boolean;
59
+
whiteList:string[];
59
60
throwError:boolean;
60
61
driver: {
61
62
name:string;
@@ -82,11 +83,17 @@ The time value in miliseconds after which the rate limiting will be reset. For e
82
83
83
84
When set to `true` it will set the response headers: `X-Ratelimit-Remaining`, `X-Ratelimit-Reset`, `X-Ratelimit-Limit` with appriopriate values.
84
85
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
+
85
92
### `throwError`
86
93
87
94
- Default: `true`
88
95
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.
0 commit comments