Make the rate limit adjustable at runtime

Node · Node · intermediate · modification

Makes the rate limit adjustable at runtime. Replaces the hardcoded `MAX_REQUESTS` constant with a module-level `maxRequests` plus a `setMaxRequests()` setter wired to the admin config endpoint, so ops can retune the cap during an incident without a redeploy. The fixed-window counting logic is unchanged.

createRateLimiter() is called once at boot and the returned middleware stays mounted for the whole process lifetime; setMaxRequests() is invoked later, at runtime, from the admin config endpoint.

Requirements

Files touched

Review this PR

Node practice