Manage limiter rules (advanced) and view metrics.
Integration points discovered at runtime and configured via JSON Configs.
-
Stored in JSON Configs (alias: rate-limits)
Counts are computed per limiter bucket.
const { helpers } = require('@intranefr/superbackend'); app.use('/api', helpers.rateLimiter.limit('globalApiLimiter'));
Identity default: userId when authenticated (Bearer JWT) else IP.
Custom identity: you can provide orgId / custom identity by using check() programmatically or passing getIdentity in middleware options.
check()
getIdentity
Modes: reportOnly records would-be blocks; enforce blocks with 429.