ghostguild-org/server/middleware
Jennie Robinson Faber 3f42307c64 fix(rate-limit): bypass middleware when ALLOW_DEV_TEST_ENDPOINTS=true
Parallel Playwright runs (6 workers, all from 127.0.0.1) burned through the
100 req/min generalLimiter budget within the first ~30s, causing every API
call (including /api/dev/test-login and /api/dev/member-login) to return 429
for the rest of the window. Auth helper waitForURL then timed out at 45s with
no redirect ever firing — surfacing as 8 cascading test failures across
auth.spec.js, board.spec.js, and admin-members.spec.js.

The bypass mirrors the existing gate used by /api/dev/* endpoints: the env
var is opt-in and only set in development (.env) or by Playwright's
webServer config. Production never sets it, so rate limiting remains active.
2026-04-26 18:06:32 +01:00
..
01.csrf.js fix(csrf): exempt /api/internal/ from double-submit check 2026-04-26 13:16:11 +01:00
02.security-headers.js fix(csp): allow secure.helcim.app for HelcimPay.js 2026-04-26 15:59:36 +01:00
03.rate-limit.js fix(rate-limit): bypass middleware when ALLOW_DEV_TEST_ENDPOINTS=true 2026-04-26 18:06:32 +01:00