Skip to content

Rate limiting middleware #29

Description

@MrImmortal09

Context

Every write endpoint needs rate limits to prevent abuse. Use Upstash Ratelimit or a simple in-memory + Redis fallback.

Acceptance criteria

  • lib/ratelimit.ts exports a limit(key, config) helper
  • Applied to: magic link requests, sign-up, recovery requests, contact form, job posting, report submission, avatar upload
  • Returns 429 with Retry-After header on breach
  • Logged to AuditLog when a user consistently hits limits

Depends on #1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendServer / database / API workhardinfraCI, hosting, deployment, storagesecuritySecurity hardening

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions