john-okeefe 39f1c88255 fix(ratelimit): split global and login budgets so storms can't lock out login
One shared 100 req / 10 min limiter counted everything —
401s, CORS preflights, even /health — so a bad-token burst
from a second frontend burned the budget and 429'd POST
/api/auth/login too, leaving no way back in short of
waiting out the window or restarting (MemoryStore reset).

New middleware/rateLimit.js holds two limiters, verified
against express-rate-limit@5.5.1:

- apiLimiter (300 / 15 min) skips OPTIONS, /health, and the
  public auth endpoints, so preflights, probes, and login
  attempts never drain real API budget.
- authLimiter (20 / 15 min, successful logins free) guards
  register/login/forgotpassword/resetpassword against
  brute force. 429 there means 20 wrong passwords, never
  a busy API.

Storm-tested with live server: 320 bad-token hits burn the
global budget yet login still returns 200; 25 bad logins
trip only the login limiter while API traffic is untouched.
2026-09-05 22:48:48 -04:00
2024-09-12 15:48:27 -04:00
2024-09-12 15:48:27 -04:00
2024-09-12 15:48:27 -04:00
2024-09-12 15:48:27 -04:00
2025-06-29 11:50:29 -04:00
2024-09-12 15:48:27 -04:00
2024-09-12 19:32:09 -04:00
2024-09-12 19:32:45 -04:00
2024-09-12 15:48:27 -04:00
2024-09-12 15:44:28 -04:00
2024-09-12 15:48:27 -04:00
2024-09-12 15:44:28 -04:00
2024-09-12 15:48:27 -04:00

games-express-api

The games API written in ExpressJS

S
Description
The games API written in ExpressJS
Readme GPL-3.0
147 KiB
v1.2
Latest
2026-09-06 10:12:24 -04:00
Languages
JavaScript 94.2%
Makefile 2.9%
Dockerfile 2.2%
Shell 0.7%