Shun Miyazawa 1 yıl önce
ebeveyn
işleme
9a57cd556d

+ 1 - 3
apps/app/src/features/rate-limiter/middleware/factory.ts

@@ -56,9 +56,7 @@ export const _consumePoints = async(
     maxRequests *= maxRequestsMultiplier;
   }
 
-  // because the maximum request is reduced by 1 if it is divisible by
-  // https://github.com/weseek/growi/pull/6225
-  const consumePoints = (POINTS_THRESHOLD + 0.0001) / maxRequests;
+  const consumePoints = POINTS_THRESHOLD / maxRequests;
   const rateLimiterRes = await rateLimiter.consume(key, consumePoints);
   return rateLimiterRes;
 };