Skip to content

RateLimiter: perPeriod/periodSeconds should be configurable per middleware/request #23

Description

@jrdnull

Brought up in the unified api doc:

Price Plans per product may sell increased Rate Limits as a feature which needs to be taken in to account

Currently the perPeriod/periodSeconds would be shared between multiple instances of the middleware, this should be configurable so you can apply different rate limiters on different endpoints.

To meet the requirements of the quote above you would need to check the session to see if they had a higher rate limit, so perhaps it should change to use a function to return the perPeriod/perSeconds so it can be different depending on the session similar to the GetKey callback.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions