upgrade dependencies and fix compatibility issues
This commit is contained in:
@@ -24,11 +24,11 @@ export function rateLimit(
|
||||
const windowStart = now - config.windowMs
|
||||
|
||||
// Clean expired entries
|
||||
for (const [key, data] of cache.entries()) {
|
||||
Array.from(cache.entries()).forEach(([key, data]) => {
|
||||
if (data.resetTime < now) {
|
||||
cache.delete(key)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let data = cache.get(identifier)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user