Skip to content

[Enhancement] Check rate limit & reset limit for request #20

@JE4GLE

Description

@JE4GLE

I have the following use case:

I have an endpoint receiving API POST requests, which require an API key for authentication. I want to rate limit only wrong API keys.

  1. Request is received
  2. Rate limit is checked, without being increased
  3. If rate is not exceeded, the API key is checked
    • If the key is correct, the limit for this specific request (IP/UA) is reset
    • Is the key incorrect, the rate limit value is increased

I haven't been able to find the following two functionalities:

  • Check, if the rate limit is already exceeded without increasing the value
    limiter.isLimitExceeded(event);
  • Reset the limit for a specific request
    limiter.reset(event);

What do you think? Do you agree that this will be a fine addition to the collection of functions this rate limiter has?

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