fix(server): remove all avatarType references after DB column drop
This commit is contained in:
@@ -3,6 +3,13 @@ const windows = new Map()
|
||||
const MAX_ATTEMPTS = 5
|
||||
const WINDOW_MS = 60_000
|
||||
|
||||
setInterval(() => {
|
||||
const now = Date.now()
|
||||
for (const [ip, entry] of windows) {
|
||||
if (now - entry.start > WINDOW_MS) windows.delete(ip)
|
||||
}
|
||||
}, 5 * 60_000).unref()
|
||||
|
||||
export function checkLoginRateLimit(ip) {
|
||||
const now = Date.now()
|
||||
const entry = windows.get(ip)
|
||||
|
||||
Reference in New Issue
Block a user