Language: TypeScript. The pull request has one bug. You get three tries to find the line, then a short debrief.
Bots try lists of leaked passwords against our sign-in form. Each address now gets 10 attempts a minute; after that, sign-in answers 429. The API runs behind our load balancer, so the client's address is taken from X-Forwarded-For.
Codetrap needs JavaScript: the code review happens in your browser.