api: remove duplicate defaults

This commit is contained in:
wukko 2024-05-16 13:58:28 +06:00
parent 40ff39d14b
commit fb81c57324
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -23,7 +23,7 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
const apiLimiter = rateLimit({ const apiLimiter = rateLimit({
windowMs: env.rateLimitWindow * 1000, windowMs: env.rateLimitWindow * 1000,
max: env.rateLimitMax || 20, max: env.rateLimitMax,
standardHeaders: true, standardHeaders: true,
legacyHeaders: false, legacyHeaders: false,
keyGenerator: req => generateHmac(getIP(req), ipSalt), keyGenerator: req => generateHmac(getIP(req), ipSalt),
@ -37,7 +37,7 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
const apiLimiterStream = rateLimit({ const apiLimiterStream = rateLimit({
windowMs: env.rateLimitWindow * 1000, windowMs: env.rateLimitWindow * 1000,
max: env.rateLimitMax || 20, max: env.rateLimitMax,
standardHeaders: true, standardHeaders: true,
legacyHeaders: false, legacyHeaders: false,
keyGenerator: req => generateHmac(getIP(req), ipSalt), keyGenerator: req => generateHmac(getIP(req), ipSalt),