mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-11-04 10:40:20 +00:00
fix(security): harden auth and request limits
This commit is contained in:
1 parent
12af18e3a3
commit
d9a36fefe6
12 files changed
+315
-30
No files matched your search
@@ -465,6 +465,8 @@ export async function handlePublicRoute(
|
||||
}
|
||||
|
||||
if ((path === '/identity/accounts/recover-2fa' || path === '/api/accounts/recover-2fa') && method === 'POST') {
|
||||
const blocked = await enforcePublicRateLimit('public-sensitive', LIMITS.rateLimit.sensitivePublicRequestsPerMinute);
|
||||
if (blocked) return blocked;
|
||||
return handleRecoverTwoFactor(request, env);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user