Releases: animir/node-rate-limiter-flexible
Releases · animir/node-rate-limiter-flexible
Set method + types fixes
- New
set
method implemented for all limiters. RateLimiterRes
constructor types is fixed. Thanks @raelcunIRateLimiterResOptions
is deprecated in favour ofIRateLimiterRes
interface.RLWrapperBlackAndWhite
optionsisWhite
andisBlack
are deprecated. UseisBlackListed
andisWhiteListed
instead.
Never expiring keys + fixes
- All limiters support Never Expiring keys now. If limiter option
duration
is 0 orblock
method called with 0 duration, key is never expiring. Note: if you want to start using never expiring keys with already created MySQL or Postgres limiters, make sure database table is re-created or alter db table to allowexpire
column to be NULL. - Added
IRateLimiterResOptions
interface. Thank you Eladio Mora. - Tests configured to be checked by eslint now. Thanks @mkxml (issue #28)
- Fixed typing for
rateLimiterInstance.get()
. Thanks @ephemer. - Fixed
ExpressBruteFlexible
reset works with ignoreIP option. - Added
ExpressBruteFlexible
prefix
option for keys.
RateLimiterQueue TypeScript bindings + MySQL fix + Cluster fix
- Fix #36 to allow dashes in MySQL database name.
- RateLimiterQueue TypeScript bindings.
- Fix Cluster limiter: it should respect all possible options to make difference between several limiters.
RateLimiterQueue
Features:
- RateLimiterQueue limiter with FIFO queue support on single server or distributed environment.
Bug-fixes:
blockDuration with inmemoryBlock superpower
Features:
- add ExpressBrute analog middleware
- use blockDuration with inmemoryBlock
Consume, penalty and reward with customDuration options
Features:
- use
consume(key, points, {customDuration: 1})
to dynamically change a duration of a current call for a key fixed by globalduration
Bug fixes:
- postgres limiter: create table (thank you @jdgriffith )
- memory limiter:
block
method duration - memcache limiter: fix possible race condition
MongoDB compound index sharding support
Features:
- MongoDB limiter supports compound unique index sharding with
indexKeyPrefix
option now. - disable prefixing keys with empty
keyPrefix
option. - mongodb: specify collection name with
tableName
option.
Bug fixes:
- postgresql: fix bug storing limits on different tables.
- implement toString, symbol inspect and toJSON for RateLimiterRes.
- fix RateLimiterUnion's consume TS response type (thanks @zephraph )
- add type signatures for toString and toJSON methods of RateLimiterRes (thanks @michaeldzjap )
Add delete method and fix MySQL Sequelize delete expired
v0.22.1 0.22.1
Fix TS bindings
v0.21.0 0.21.0
Add RateLimiterMemcache
- fix skipped black and white wrapper import