What
The /health, /health/live, /health/ready, and /metrics endpoints have no rate limiting, while all other routes use the global rate limit.
Why
- Health endpoints make database, Redis, Horizon, and Soroban RPC calls
- An attacker could spam these endpoints to exhaust resources
/metrics requires authentication but still makes registry calls
Scope
Add rate limit overrides for health and metrics endpoints.
Acceptance Criteria
Technical Context
- File:
src/server.ts (lines 99-157)
- Pattern: See
src/middleware/rate-limit.ts for authRateLimit and claimRateLimit examples
- Fastify config: Use
config: { rateLimit: ... } option on route registration
What
The
/health,/health/live,/health/ready, and/metricsendpoints have no rate limiting, while all other routes use the global rate limit.Why
/metricsrequires authentication but still makes registry callsScope
Add rate limit overrides for health and metrics endpoints.
Acceptance Criteria
/healthand/health/readyhave rate limiting (e.g., 30 req/min)/health/livehas minimal rate limiting (it's lightweight)/metricshas rate limiting (e.g., 10 req/min)Technical Context
src/server.ts(lines 99-157)src/middleware/rate-limit.tsforauthRateLimitandclaimRateLimitexamplesconfig: { rateLimit: ... }option on route registration