Shun Miyazawa 1 год назад
Родитель
Сommit
9a57cd556d
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      apps/app/src/features/rate-limiter/middleware/factory.ts

+ 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;
 };