add rate limiting

This commit is contained in:
Alex Holliday committed 2025-07-28 12:00:09 -07:00
1 parent 051c17f454
commit ec99b5e9b4
5 files changed
+60 -11

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import rateLimit from "express-rate-limit";
export const generalApiLimiter = rateLimit({
window: 60 * 1000,
limit: 600,
standardHeaders: true,
legacyHeaders: false,
ipv6Subnet: 64,
});
export const authApiLimiter = rateLimit({
window: 60 * 1000,
limit: 5,
standardHeaders: true,
legacyHeaders: false,
ipv6Subnet: 64,
});