feat(api): implement rate limiting for abuse prevention

Add @fastify/rate-limit with granular policies for different routes
Support TRUST_PROXY environment variable for reverse proxies
This commit is contained in:
2026-05-03 15:04:07 +08:00
parent 8f55db9061
commit 0c76d6bfc8
7 changed files with 453 additions and 69 deletions

View File

@@ -15,6 +15,7 @@
"dependencies": {
"@fastify/cors": "latest",
"@fastify/multipart": "^10.0.0",
"@fastify/rate-limit": "^10.3.0",
"@fastify/static": "^9.1.3",
"fastify": "latest",
"pg": "latest"