From 9ef6fdaec966847c26f52969fef2509556ab1eae Mon Sep 17 00:00:00 2001 From: Maurits Lourens Date: Wed, 16 Mar 2022 13:43:09 +0100 Subject: [PATCH] revert uncommenting code --- packages/server/src/api/routes/public/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/routes/public/index.ts b/packages/server/src/api/routes/public/index.ts index 3680496a84..57436def1d 100644 --- a/packages/server/src/api/routes/public/index.ts +++ b/packages/server/src/api/routes/public/index.ts @@ -30,7 +30,7 @@ function getApiLimitPerSecond(): number { return parseInt(env.API_REQ_LIMIT_PER_SEC) } -/*if (!env.isTest()) { +if (!env.isTest()) { const REDIS_OPTS = getRedisOptions() let options if (REDIS_OPTS.redisProtocolUrl) { @@ -51,7 +51,7 @@ function getApiLimitPerSecond(): number { RateLimit.defaultOptions({ store: new Stores.Redis(options), }) -}*/ +} // rate limiting, allows for 2 requests per second const limiter = RateLimit.middleware({ interval: { sec: 1 },