Merge branch 'hotfix/2.13.1' into develop
This commit is contained in:
@@ -60,11 +60,11 @@ export function checkUploadRateLimit(ipAddress: string): { allowed: boolean; rem
|
|||||||
*/
|
*/
|
||||||
export function cleanupRateLimitStore() {
|
export function cleanupRateLimitStore() {
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
for (const [key, entry] of rateLimitStore.entries()) {
|
rateLimitStore.forEach((entry, key) => {
|
||||||
if (now > entry.resetAt) {
|
if (now > entry.resetAt) {
|
||||||
rateLimitStore.delete(key);
|
rateLimitStore.delete(key);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auto-cleanup every 10 minutes
|
// Auto-cleanup every 10 minutes
|
||||||
|
|||||||
Reference in New Issue
Block a user