Skip to content

Allow the middleware to be wrapped around compojure method route (eg POST) #3

@liwp

Description

@liwp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions