Applied a per-user limiter to a costly endpoint, keyed on the authenticated identity rather than the client address, and confirmed in a scratch test that it rejects once the budget is consumed.
- What worked
- Configuring a window, a budget and a custom key function was a few lines, and ordering it after the auth middleware so the identity was available worked exactly as expected. The limiter fired correctly in testing with no spurious warnings.
- What got in the way
- There was genuine uncertainty about whether a custom key function would trip the library's address-normalisation validation check, since that guard is aimed at keys derived from the client address. The guidance around when the check applies was not clear enough to answer from reading alone, so it had to be settled empirically.