documenso/.github
Lucas Smith 653ab3678a
feat: better ratelimiting (#2520)
Replace hono-rate-limiter with a Prisma/PostgreSQL bucketed counter
approach that works correctly across multiple instances without sticky
sessions.

- Add RateLimit model with composite PK (key, action, bucket) and atomic
upsert
- Create rate limit factory with window parsing, bucket computation, and
fail-open
- Define auth-tier and API-tier rate limit instances
- Add Hono middleware, rateLimitResponse helper, and tRPC
assertRateLimit helper
- Wire rate limit headers through AppError constructor (was declared but
never assigned)
- Apply rate limits to auth routes (email-password, passkey), tRPC
routes
  (2FA email, link org account), API routes, and file upload endpoints
- Add cleanup cron job for expired rate limit rows (batched delete every
15 min)
- Remove hono-rate-limiter dependency
2026-02-20 12:23:02 +11:00
..
actions chore: update ci 2025-03-27 22:49:59 +11:00
ISSUE_TEMPLATE chore: update github feature template (#849) 2024-01-23 11:28:11 +11:00
PULL_REQUEST_TEMPLATE chore: set default PR template 2024-03-24 17:01:21 +08:00
workflows feat: better ratelimiting (#2520) 2026-02-20 12:23:02 +11:00
dependabot.yml fix: remove marketing (#1562) 2024-12-31 15:45:22 +11:00
labeler.yml fix: remove marketing (#1562) 2024-12-31 15:45:22 +11:00
PULL_REQUEST_TEMPLATE.md fix: remove unsupported frontmatter from PULL_REQUEST_TEMPLATE.md (#1867) 2025-07-15 16:18:15 +10:00