mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 09:36:08 +00:00
- Add R2 client setup and audio upload functionality in lib/r2.ts. - Create audio file cleanup functions in lib/r2-cleanup.ts to delete voice files associated with videos, projects, and workspaces. - Enhance rate limiting in lib/rate-limit.ts with new action-specific limits and improved IP validation. - Introduce a unified rate limit check function that returns a 429 response when limits are exceeded. - Update package.json to include the AWS SDK for S3.
13 lines
413 B
TypeScript
13 lines
413 B
TypeScript
import { handlers } from '@/lib/auth';
|
|
import { rateLimit } from '@/lib/rate-limit';
|
|
|
|
export const { GET } = handlers;
|
|
|
|
// Wrap NextAuth POST with login rate limiting
|
|
export async function POST(request: Request) {
|
|
const limited = await rateLimit(request, 'login');
|
|
if (limited) return limited;
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
return handlers.POST(request as any);
|
|
}
|