Skip to content

v0.7.4

Choose a tag to compare

@github-actions github-actions released this 03 Aug 22:41
· 104 commits to main since this release

Patch Changes

  • 7b8b6c2: Add TRUST_PROXY so the client address can be read from X-Forwarded-For.

    Express leaves trust proxy off by default, so behind a load balancer req.ip resolved to the
    balancer rather than the caller. Every client shared one bucket in the global rate limiter and the
    slow-down middleware, and express-rate-limit logged an ERR_ERL_UNEXPECTED_X_FORWARDED_FOR
    validation error on each request. Set TRUST_PROXY to the number of proxies in front of the server
    (1 behind a single load balancer) to restore per-client limiting. It stays unset by default
    because a directly reachable server that trusts the header lets a client forge its own address.