At the moment, if the middleware is wrapped around compojure routes the rate limit counter is incremented every time when that route is being tested for a match. Clearly the counter should only be incremented when the route actually matches. The fix seems to be to not increment the rate limit counter if the handler returns nil. This means that we can't support the non-stacking middleware anymore, that does the counter incrementing before executing the handler.
At the moment, if the middleware is wrapped around compojure routes the rate limit counter is incremented every time when that route is being tested for a match. Clearly the counter should only be incremented when the route actually matches. The fix seems to be to not increment the rate limit counter if the
handlerreturnsnil. This means that we can't support the non-stacking middleware anymore, that does the counter incrementing before executing the handler.