- Add DB index on bans.user_id to speed up per-request ban lookups (migration 0008) - Replace in-process rate limiter with Redis-backed implementation with in-memory fallback - Add Redis caching layer for site settings with TTL invalidation (migration 0009) - Add rate limiting to resetPassword to prevent token brute-force attacks - Update all rateLimit callers to await the now-async function - Flesh out RadioContests and RadioGiveaways models with title, description, prize, date, and winner columns - Update radio contest/giveaway pages to display new fields - Add tests for rate limiter (4 tests) and password-reset actions (3 tests) - Add REDIS_URL environment variable (optional, falls back to in-memory)
5 lines
244 B
SQL
5 lines
244 B
SQL
-- 0008_add_bans_user_id_index.sql
|
|
-- Adds an index on bans.user_id to speed up ban lookups by user (used by
|
|
-- the access guard on every page request for logged-in users).
|
|
CREATE INDEX IF NOT EXISTS `bans_user_id_index` ON `bans` (`user_id`);
|