feat: custom rate limit for self hosters

This commit is contained in:
ShubhamPalriwala
2024-06-12 10:24:36 +05:30
parent 6c596092b0
commit e6ed1231cd
19 changed files with 535 additions and 20 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ export const main = async ({ db, smtp, logger, queue, keyStore }: TMain) => {
// Rate limiters and security headers
if (appCfg.isProductionMode) {
await server.register<FastifyRateLimitOptions>(ratelimiter, globalRateLimiterCfg());
await server.register<FastifyRateLimitOptions>(ratelimiter, await globalRateLimiterCfg(db));
}
await server.register(helmet, { contentSecurityPolicy: false });