Implement Redis rate limiting middleware for spam endpoints (FRE-4507)
- Add ioredis dependency to API package - Create Redis connection utility (apps/api/src/config/redis.ts) - Create Redis-backed spam rate limit middleware with per-minute and daily limits - Create spam classification routes (SMS, number reputation, call analysis, feedback) - Register middleware and routes in API server - Add 7 passing tests for rate limit enforcement - Update vitest config with required env vars Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -7,6 +7,10 @@ export default defineConfig({
|
||||
deps: {
|
||||
interopDefault: true,
|
||||
},
|
||||
env: {
|
||||
HIYA_API_KEY: 'test-api-key',
|
||||
HIYA_API_URL: 'https://api.hiya.com/v1',
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ['ws'],
|
||||
|
||||
Reference in New Issue
Block a user