diff --git a/src/helpers/middleware.ts b/src/helpers/middleware.ts index 7dc35c32e..5b3e4e3c1 100644 --- a/src/helpers/middleware.ts +++ b/src/helpers/middleware.ts @@ -127,9 +127,11 @@ export const rateLimitHandler = async ( if (apiKey) { const apiKeyDetails = await getApiKey(apiKey); if (apiKeyDetails.userId) { + res.setHeader("X-RateLimit-Limit-Type", "api-key"); return rateLimiter(req, res, next); } } + res.setHeader("X-RateLimit-Limit-Type", "public"); return publicRateLimiter(req, res, next); };