feat: added rate limit config

This commit is contained in:
Ritesh Ghosh
2023-08-07 20:42:17 +05:30
parent 38da70027a
commit 3014ab8ce4
+9
View File
@@ -0,0 +1,9 @@
import { rateLimit } from "express-rate-limit";
export const ratelimit = rateLimit({
windowMs: 10 * 60 * 1000,
max: 100,
legacyHeaders: false,
standardHeaders: true,
message: "Too many API requests, try again later",
});