express-rate-limit 7.1.3 → 7.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -40,13 +40,13 @@ var getResetSeconds = (resetTime, windowMs) => {
40
40
  var setLegacyHeaders = (response, info) => {
41
41
  if (response.headersSent)
42
42
  return;
43
- response.setHeader("X-RateLimit-Limit", info.limit);
44
- response.setHeader("X-RateLimit-Remaining", info.remaining);
43
+ response.setHeader("X-RateLimit-Limit", info.limit.toString());
44
+ response.setHeader("X-RateLimit-Remaining", info.remaining.toString());
45
45
  if (info.resetTime instanceof Date) {
46
46
  response.setHeader("Date", (/* @__PURE__ */ new Date()).toUTCString());
47
47
  response.setHeader(
48
48
  "X-RateLimit-Reset",
49
- Math.ceil(info.resetTime.getTime() / 1e3)
49
+ Math.ceil(info.resetTime.getTime() / 1e3).toString()
50
50
  );
51
51
  }
52
52
  };
@@ -56,10 +56,10 @@ var setDraft6Headers = (response, info, windowMs) => {
56
56
  const windowSeconds = Math.ceil(windowMs / 1e3);
57
57
  const resetSeconds = getResetSeconds(info.resetTime);
58
58
  response.setHeader("RateLimit-Policy", `${info.limit};w=${windowSeconds}`);
59
- response.setHeader("RateLimit-Limit", info.limit);
60
- response.setHeader("RateLimit-Remaining", info.remaining);
59
+ response.setHeader("RateLimit-Limit", info.limit.toString());
60
+ response.setHeader("RateLimit-Remaining", info.remaining.toString());
61
61
  if (resetSeconds)
62
- response.setHeader("RateLimit-Reset", resetSeconds);
62
+ response.setHeader("RateLimit-Reset", resetSeconds.toString());
63
63
  };
64
64
  var setDraft7Headers = (response, info, windowMs) => {
65
65
  if (response.headersSent)
@@ -76,7 +76,7 @@ var setRetryAfterHeader = (response, info, windowMs) => {
76
76
  if (response.headersSent)
77
77
  return;
78
78
  const resetSeconds = getResetSeconds(info.resetTime, windowMs);
79
- response.setHeader("Retry-After", resetSeconds);
79
+ response.setHeader("Retry-After", resetSeconds.toString());
80
80
  };
81
81
 
82
82
  // source/validations.ts
@@ -666,7 +666,7 @@ var rateLimit = (passedOptions) => {
666
666
  };
667
667
  if (config.skipFailedRequests) {
668
668
  response.on("finish", async () => {
669
- if (!config.requestWasSuccessful(request, response))
669
+ if (!await config.requestWasSuccessful(request, response))
670
670
  await decrementKey();
671
671
  });
672
672
  response.on("close", async () => {
@@ -679,7 +679,7 @@ var rateLimit = (passedOptions) => {
679
679
  }
680
680
  if (config.skipSuccessfulRequests) {
681
681
  response.on("finish", async () => {
682
- if (config.requestWasSuccessful(request, response))
682
+ if (await config.requestWasSuccessful(request, response))
683
683
  await decrementKey();
684
684
  });
685
685
  }
package/dist/index.mjs CHANGED
@@ -12,13 +12,13 @@ var getResetSeconds = (resetTime, windowMs) => {
12
12
  var setLegacyHeaders = (response, info) => {
13
13
  if (response.headersSent)
14
14
  return;
15
- response.setHeader("X-RateLimit-Limit", info.limit);
16
- response.setHeader("X-RateLimit-Remaining", info.remaining);
15
+ response.setHeader("X-RateLimit-Limit", info.limit.toString());
16
+ response.setHeader("X-RateLimit-Remaining", info.remaining.toString());
17
17
  if (info.resetTime instanceof Date) {
18
18
  response.setHeader("Date", (/* @__PURE__ */ new Date()).toUTCString());
19
19
  response.setHeader(
20
20
  "X-RateLimit-Reset",
21
- Math.ceil(info.resetTime.getTime() / 1e3)
21
+ Math.ceil(info.resetTime.getTime() / 1e3).toString()
22
22
  );
23
23
  }
24
24
  };
@@ -28,10 +28,10 @@ var setDraft6Headers = (response, info, windowMs) => {
28
28
  const windowSeconds = Math.ceil(windowMs / 1e3);
29
29
  const resetSeconds = getResetSeconds(info.resetTime);
30
30
  response.setHeader("RateLimit-Policy", `${info.limit};w=${windowSeconds}`);
31
- response.setHeader("RateLimit-Limit", info.limit);
32
- response.setHeader("RateLimit-Remaining", info.remaining);
31
+ response.setHeader("RateLimit-Limit", info.limit.toString());
32
+ response.setHeader("RateLimit-Remaining", info.remaining.toString());
33
33
  if (resetSeconds)
34
- response.setHeader("RateLimit-Reset", resetSeconds);
34
+ response.setHeader("RateLimit-Reset", resetSeconds.toString());
35
35
  };
36
36
  var setDraft7Headers = (response, info, windowMs) => {
37
37
  if (response.headersSent)
@@ -48,7 +48,7 @@ var setRetryAfterHeader = (response, info, windowMs) => {
48
48
  if (response.headersSent)
49
49
  return;
50
50
  const resetSeconds = getResetSeconds(info.resetTime, windowMs);
51
- response.setHeader("Retry-After", resetSeconds);
51
+ response.setHeader("Retry-After", resetSeconds.toString());
52
52
  };
53
53
 
54
54
  // source/validations.ts
@@ -638,7 +638,7 @@ var rateLimit = (passedOptions) => {
638
638
  };
639
639
  if (config.skipFailedRequests) {
640
640
  response.on("finish", async () => {
641
- if (!config.requestWasSuccessful(request, response))
641
+ if (!await config.requestWasSuccessful(request, response))
642
642
  await decrementKey();
643
643
  });
644
644
  response.on("close", async () => {
@@ -651,7 +651,7 @@ var rateLimit = (passedOptions) => {
651
651
  }
652
652
  if (config.skipSuccessfulRequests) {
653
653
  response.on("finish", async () => {
654
- if (config.requestWasSuccessful(request, response))
654
+ if (await config.requestWasSuccessful(request, response))
655
655
  await decrementKey();
656
656
  });
657
657
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-rate-limit",
3
- "version": "7.1.3",
3
+ "version": "7.1.5",
4
4
  "description": "Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.",
5
5
  "author": {
6
6
  "name": "Nathan Friedly",
@@ -8,7 +8,11 @@
8
8
  },
9
9
  "license": "MIT",
10
10
  "homepage": "https://github.com/express-rate-limit/express-rate-limit",
11
- "repository": "https://github.com/express-rate-limit/express-rate-limit",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/express-rate-limit/express-rate-limit.git"
14
+ },
15
+ "funding": "https://github.com/sponsors/express-rate-limit",
12
16
  "keywords": [
13
17
  "express-rate-limit",
14
18
  "express",
@@ -45,11 +49,7 @@
45
49
  "types": "./dist/index.d.ts",
46
50
  "files": [
47
51
  "dist/",
48
- "tsconfig.json",
49
- "package.json",
50
- "readme.md",
51
- "license.md",
52
- "changelog.md"
52
+ "tsconfig.json"
53
53
  ],
54
54
  "engines": {
55
55
  "node": ">= 16"
@@ -91,6 +91,7 @@
91
91
  "husky": "8.0.3",
92
92
  "jest": "29.7.0",
93
93
  "lint-staged": "15.0.2",
94
+ "mintlify": "4.0.63",
94
95
  "npm-run-all": "4.1.5",
95
96
  "ratelimit-header-parser": "0.1.0",
96
97
  "supertest": "6.3.3",
package/changelog.md DELETED
@@ -1,410 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to
7
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
-
9
- ## [7.1.3](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v7.1.3)
10
-
11
- ### Changed
12
-
13
- - Loosened peer dependencies to explicitly allow the Express 5 beta. (See
14
- [#415](https://github.com/express-rate-limit/express-rate-limit/issues/415))
15
-
16
- ## [7.1.2](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v7.1.2)
17
-
18
- ### Changed
19
-
20
- - Re-organized documentation from readme into docs/ folder and added
21
- documentation website.
22
-
23
- ## [v7.1.1](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v7.1.1)
24
-
25
- ### Added
26
-
27
- - Enabled provenance statement generation, see
28
- https://github.com/express-rate-limit/express-rate-limit#406.
29
-
30
- ## [7.1.0](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v7.1.0)
31
-
32
- ### Changed
33
-
34
- - The `getKey` method is now always defined. If the store does not have the
35
- required `get` method, `getKey` will throw an error explaining this.
36
-
37
- ## [7.0.2](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v7.0.2)
38
-
39
- ### Added
40
-
41
- - Added `cluster-memory-store` to the readme and made a couple of other minor
42
- clarifications.
43
-
44
- ## [7.0.1](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v7.0.1)
45
-
46
- ### Added
47
-
48
- - Added `rate-limit-postgresql` to the `stores` list in the readme.
49
-
50
- ## [7.0.0](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v7.0.0)
51
-
52
- ### Breaking
53
-
54
- - Changed behavior when `max` is set to 0:
55
- - Previously, `max: 0` was treated as a 'disable' flag and would allow all
56
- requests through.
57
- - Starting with v7, all requests will be blocked when max is set to 0.
58
- - To replicate the old behavior, use the
59
- [skip](https://github.com/express-rate-limit/express-rate-limit#skip)
60
- function instead.
61
- - Renamed `req.rateLimit.current` to `req.rateLimit.used`.
62
- - `current` is now a hidden getter that will return the `used` value, but it
63
- will not appear when iterating over the keys or calling `JSON.stringify()`.
64
- - Changed the minimum required Node version from v14 to v16.
65
- - `express-rate-limit` now targets `es2022` in TypeScript/ESBuild.
66
- - Bumped TypeScript from v4 to v5 and `dts-bundle-generator` from v7 to v8.
67
-
68
- ### Deprecated
69
-
70
- - Removed the `draft_polli_ratelimit_headers` option (it was deprecated in v6).
71
- - Use `standardHeaders: 'draft-6'` instead.
72
- - Removed the `onLimitReached` option (it was deprecated in v6).
73
- - [This](<(https://github.com/express-rate-limit/express-rate-limit/wiki/Error-Codes#wrn_erl_deprecated_on_limit_reached)>)
74
- is an example of how to replicate it's behavior with a custom `handler`
75
- option.
76
-
77
- ### Changed
78
-
79
- - The `MemoryStore` now uses precise, per-user reset times rather than a global
80
- window that resets all users at once.
81
- - The `limit` configuration option is now prefered to `max`.
82
- - It still shows the same behavior, and `max` is still supported. The change
83
- was made to better align with terminology used in the IETF standard drafts.
84
-
85
- ### Added
86
-
87
- - The `validate` config option can now be an object with keys to enable or
88
- disable specific validation checks. For more information, see
89
- [this](https://github.com/express-rate-limit/express-rate-limit#validate).
90
-
91
- ## [6.11.2](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.11.2)
92
-
93
- ### Fixed
94
-
95
- - Restored `IncrementResponse ` TypeScript type (See
96
- [#397](https://github.com/express-rate-limit/express-rate-limit/pull/397))
97
-
98
- ## [6.11.1](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.11.1)
99
-
100
- ### Fixed
101
-
102
- - Check for prefixed keys when validating that the stores have single counted
103
- keys (See
104
- [#395](https://github.com/express-rate-limit/express-rate-limit/issues/395)).
105
-
106
- ## [6.11.0](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.11.0)
107
-
108
- ### Added
109
-
110
- - Support for retrieving the current hit count and reset time for a given key
111
- from a store (See
112
- [#390](https://github.com/express-rate-limit/express-rate-limit/issues/389)).
113
-
114
- ## [6.10.0](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.10.0)
115
-
116
- ### Added
117
-
118
- - Support for combined `RateLimit` header from the
119
- [RateLimit header fields for HTTP standardization draft](https://github.com/ietf-wg-httpapi/ratelimit-headers)
120
- adopted by the IETF. Enable by setting `standardHeaders: 'draft-7'`.
121
- - New `standardHeaders: 'draft-6'` option, treated equivalent to
122
- `standardHeaders: true` from previous releases. Note that `true` and `false`
123
- are still supported.
124
- - New `RateLimit-Policy` header added when `standardHeaders` is set to
125
- `'draft-6'`, `'draft-7'`, or `true`.
126
- - Warning when using deprecated `draft_polli_ratelimit_headers` option.
127
- - Warning when using deprecated `onLimitReached` option.
128
- - Warning when `totalHits` value returned from Store is invalid.
129
-
130
- ## [6.9.0](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.9.0)
131
-
132
- ### Added
133
-
134
- - New validaion check for double-counted requests.
135
- - Added help link to each validation error, directing users to the appropriate
136
- wiki page for more info.
137
-
138
- ### Changed
139
-
140
- - Miscellaneous documenation improvements.
141
-
142
- ## [6.8.1](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.8.0) & [6.7.2](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.8.0)
143
-
144
- ### Changed
145
-
146
- - Revert 6.7.1 change that bumped typescript from 5.x to 4.x and
147
- dts-bundle-generator from 8.x to 7.x (See
148
- [#360](https://github.com/express-rate-limit/express-rate-limit/issues/360)).
149
-
150
- ## [6.8.0](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.8.0)
151
-
152
- ### Added
153
-
154
- - Added a set of validation checks that will log an error if failed. See
155
- https://github.com/express-rate-limit/express-rate-limit/wiki/Error-Codes for
156
- a list of potential errors. Can be disabled by setting `validate: false` in
157
- the configuration. Automatically disables after the first request. (See
158
- [#358](https://github.com/express-rate-limit/express-rate-limit/issues/358)).
159
-
160
- ## [6.7.1](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.7.1)
161
-
162
- ### Fixed
163
-
164
- - Fixed compatibility with TypeScript's TypeScript new `node16` module
165
- resolution strategy (See
166
- [#355](https://github.com/express-rate-limit/express-rate-limit/issues/355)).
167
-
168
- ### Changed
169
-
170
- - Bumped development dependencies
171
- - This initially include bumping typescript from 4.x to 5.x and
172
- dts-bundle-generator from 7.x to 8.x
173
- - Added `node` 20 to list of versions the CI jobs run on.
174
-
175
- No functional changes.
176
-
177
- ## [6.7.0](https://github.com/express-rate-limit/express-rate-limit/releases/tag/v6.7.0)
178
-
179
- ### Changed
180
-
181
- - Updated links to point to the new `express-rate-limit` organization on GitHub.
182
- - Added advertisement to `readme.md` for project sponsor
183
- [Zuplo](https://zuplo.link/express-rate-limit).
184
- - Updated to `typescript` version 5 and bumped other dependencies.
185
- - Dropped `node` 12, and added `node` 19 to the list of versions the CI jobs run
186
- on.
187
-
188
- No functional changes.
189
-
190
- ## [6.6.0](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.6.0)
191
-
192
- ### Added
193
-
194
- - Added `shutdown` method to the Store interface and the MemoryStore.
195
-
196
- ## [6.5.2](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.5.2)
197
-
198
- ### Fixed
199
-
200
- - Fixed an issue with missing types in ESM monorepos.
201
-
202
- ## [6.5.1](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.5.1)
203
-
204
- ### Added
205
-
206
- - The message option can now be a (sync/asynx) function that returns a value
207
- (#311)
208
-
209
- ### Changed
210
-
211
- - Updated all dependencies
212
-
213
- Note: 6.5.0 was not released due to CI automation issues.
214
-
215
- ## [6.4.0](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.3.0)
216
-
217
- ### Added
218
-
219
- - Adds Express 5 (`5.0.0-beta.1`) as a supported peer dependency (#304)
220
-
221
- ### Changed
222
-
223
- - Tests are now run on Node 12, 14, 16 and 18 on CI (#305)
224
- - Updated all development dependencies (#306)
225
-
226
- ## [6.3.0](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.3.0)
227
-
228
- ### Changed
229
-
230
- - Changes the build target to es2019 so that ESBuild outputs code that can run
231
- with Node 12.
232
- - Changes the minimum required Node version to 12.9.0.
233
-
234
- ## [6.2.1](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.2.1)
235
-
236
- ### Fixed
237
-
238
- - Use the default value for an option when `undefined` is passed to the rate
239
- limiter.
240
-
241
- ## [6.2.0](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.2.0)
242
-
243
- ### Added
244
-
245
- - Export the `MemoryStore`, so it can now be imported as a named import
246
- (`import { MemoryStore } from 'express-rate-limit'`).
247
-
248
- ### Fixed
249
-
250
- - Deprecate the `onLimitReached` option (this was supposed to be deprecated in
251
- v6.0.0 itself); developers should use a custom handler function that checks if
252
- the rate limit has been exceeded instead.
253
-
254
- ## [6.1.0](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.1.0)
255
-
256
- ### Added
257
-
258
- - Added a named export `rateLimit` in case the default import does not work.
259
-
260
- ### Fixed
261
-
262
- - Added a named export `default`, so Typescript CommonJS developers can
263
- default-import the library (`import rateLimit from 'express-rate-limit'`).
264
-
265
- ## [6.0.5](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.0.5)
266
-
267
- ### Fixed
268
-
269
- - Use named imports for ExpressJS types so users do not need to enable the
270
- `esModuleInterop` flag in their Typescript compiler configuration.
271
-
272
- ## [6.0.4](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.0.4)
273
-
274
- ### Fixed
275
-
276
- - Upload the built package as a `.tgz` to GitHub releases.
277
-
278
- ### Changed
279
-
280
- - Add ` main` and `module` fields to `package.json`. This helps tools such as
281
- ESLint that do not yet support the `exports` field.
282
- - Bumped the minimum node.js version in `package-lock.json` to match
283
- `package.json`
284
-
285
- ## [6.0.3](https://github.com/nfriedly/express-rate-limit/releases/tag/v6.0.3)
286
-
287
- ### Changed
288
-
289
- - Bumped minimum Node version from 12.9 to 14.5 in `package.json` because the
290
- transpiled output uses the nullish coalescing operator (`??`), which
291
- [isn't supported in node.js prior to 14.x](https://node.green/#ES2020-features--nullish-coalescing-operator-----).
292
-
293
- ## [6.0.2](https://github.com/nfriedly/express-rate-limit/releases/v6.0.2)
294
-
295
- ### Fixed
296
-
297
- - Ensure CommonJS projects can import the module.
298
-
299
- ### Added
300
-
301
- - Add additional tests that test:
302
- - importing the library in `js-cjs`, `js-esm`, `ts-cjs`, `ts-esm`
303
- environments.
304
- - usage of the library with external stores (`redis`, `mongo`, `memcached`,
305
- `precise`).
306
-
307
- ### Changed
308
-
309
- - Use [`esbuild`](https://esbuild.github.io/) to generate ESM and CJS output.
310
- This reduces the size of the built package from 138 kb to 13kb and build time
311
- to 4 ms! :rocket:
312
- - Use [`dts-bundle-generator`](https://github.com/timocov/dts-bundle-generator)
313
- to generate a single Typescript declaration file.
314
-
315
- ## [6.0.1](https://github.com/nfriedly/express-rate-limit/releases/v6.0.1)
316
-
317
- ### Fixed
318
-
319
- - Ensure CommonJS projects can import the module.
320
-
321
- ## [6.0.0](https://github.com/nfriedly/express-rate-limit/releases/v6.0.0)
322
-
323
- ### Added
324
-
325
- - `express` 4.x as a peer dependency.
326
- - Better Typescript support (the library was rewritten in Typescript).
327
- - Export the package as both ESM and CJS.
328
- - Publish the built package (`.tgz` file) on GitHub releases as well as the npm
329
- registry.
330
- - Issue and PR templates.
331
- - A contributing guide.
332
-
333
- ### Changed
334
-
335
- - Rename the `draft_polli_ratelimit_headers` option to `standardHeaders`.
336
- - Rename the `headers` option to `legacyHeaders`.
337
- - `Retry-After` header is now sent if either `legacyHeaders` or
338
- `standardHeaders` is set.
339
- - Allow `keyGenerator` to be an async function/return a promise.
340
- - Change the way custom stores are defined.
341
- - Add the `init` method for stores to set themselves up using options passed
342
- to the middleware.
343
- - Rename the `incr` method to `increment`.
344
- - Allow the `increment`, `decrement`, `resetKey` and `resetAll` methods to
345
- return a promise.
346
- - Old stores will automatically be promisified and used.
347
- - The package can now only be used with NodeJS version 12.9.0 or greater.
348
- - The `onLimitReached` configuration option is now deprecated. Replace it with a
349
- custom `handler` that checks the number of hits.
350
-
351
- ### Removed
352
-
353
- - Remove the deprecated `limiter.resetIp` method (use the `limiter.resetKey`
354
- method instead).
355
- - Remove the deprecated options `delayMs`, `delayAfter` (the delay functionality
356
- was moved to the
357
- [`express-slow-down`](https://github.com/nfriedly/express-slow-down) package)
358
- and `global` (use a key generator that returns a constant value).
359
-
360
- ## [5.x](https://github.com/nfriedly/express-rate-limit/releases/tag/v5.5.1)
361
-
362
- ### Added
363
-
364
- - The middleware ~throws~ logs an error if `request.ip` is undefined.
365
-
366
- ### Removed
367
-
368
- - Removes typescript typings. (See
369
- [#138](https://github.com/nfriedly/express-rate-limit/issues/138))
370
-
371
- ## [4.x](https://github.com/nfriedly/express-rate-limit/releases/tag/v4.0.4)
372
-
373
- ### Changed
374
-
375
- - The library no longer modifies the passed-in options object, it instead makes
376
- a clone of it.
377
-
378
- ## [3.x](https://github.com/nfriedly/express-rate-limit/releases/tag/v3.5.2)
379
-
380
- ### Added
381
-
382
- - Simplifies the default `handler` function so that it no longer changes the
383
- response format. The default handler also uses
384
- [response.send](https://expressjs.com/en/4x/api.html#response.send).
385
-
386
- ### Changes
387
-
388
- - `onLimitReached` now only triggers once for a client and window. However, the
389
- `handle` method is called for every blocked request.
390
-
391
- ### Removed
392
-
393
- - The `delayAfter` and `delayMs` options; they were moved to the
394
- [express-slow-down](https://npmjs.org/package/express-slow-down) package.
395
-
396
- ## [2.x](https://github.com/nfriedly/express-rate-limit/releases/tag/v2.14.2)
397
-
398
- ### Added
399
-
400
- - Support external stores (from version 2.3.0) onwards.
401
- - A `limiter.resetKey()` method to reset the hit counter for a particular client
402
-
403
- ### Changes
404
-
405
- - The rate limiter now uses a less precise but less resource intensive method of
406
- tracking hits from a client.
407
-
408
- ### Removed
409
-
410
- - The `global` option.