From 6f3028714fc7d25694a0340ff4995a485cb81525 Mon Sep 17 00:00:00 2001 From: Chaitanya Date: Wed, 9 Aug 2023 09:41:02 +0530 Subject: [PATCH] Disable legacy headers (#636) * Return limits and remaining count in headers * Use keycard.js from github * Update keycard.js * Update keycard.js package * Disable legacy headers * Update rateLimit.ts --- src/helpers/rateLimit.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/helpers/rateLimit.ts b/src/helpers/rateLimit.ts index 93d549ea..c0bcd08e 100644 --- a/src/helpers/rateLimit.ts +++ b/src/helpers/rateLimit.ts @@ -7,6 +7,7 @@ export default rateLimit({ max: 60, keyGenerator: req => getIp(req), standardHeaders: true, + legacyHeaders: false, skip: (req, res) => { const keycardData = res.locals.keycardData; if (keycardData?.valid && !keycardData.rateLimited) {