rate-limiter-memory
Version:
Node.js rate limiter by key and protection from DDoS and Brute-Force attacks in process Memory, Redis, MongoDb, Memcached, MySQL, PostgreSQL, Cluster or PM
19 lines (16 loc) • 390 B
JavaScript
const LIMITER_TYPES = {
MEMORY: 'memory',
CLUSTER: 'cluster',
MEMCACHE: 'memcache',
MONGO: 'mongo',
REDIS: 'redis',
MYSQL: 'mysql',
POSTGRES: 'postgres',
DYNAMO: 'dynamo',
PRISMA: 'prisma',
};
const ERR_UNKNOWN_LIMITER_TYPE_MESSAGE = 'Unknown limiter type. Use one of LIMITER_TYPES constants.';
module.exports = {
LIMITER_TYPES,
ERR_UNKNOWN_LIMITER_TYPE_MESSAGE,
};