Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

BUG: Incorrect Log Messages #155

Closed
g4mb10r opened this issue Oct 31, 2020 · 0 comments
Closed

BUG: Incorrect Log Messages #155

g4mb10r opened this issue Oct 31, 2020 · 0 comments
Labels

Comments

@g4mb10r
Copy link

g4mb10r commented Oct 31, 2020

@stefanprodan When a request is blocked you receive a message like this in the log:

AspNetCoreRateLimit.IpRateLimitMiddleware: Information: Request get:/api/foobars from IP 123.123.123.123 has been blocked, quota 2/1m exceeded by 3. Blocked by rule :/api/,

The log message incorrectly reports the quota was exceeded by the total number of requests, not the difference between the quota and the total number of requests.

In this example, this is the third request and so it should be blocked because the quota is two. The log message reports the quota has been exceeded by 3, but it has only been exceeded by 1.

@cristipufu cristipufu added the bug label Oct 31, 2020
cristipufu added a commit that referenced this issue Oct 31, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants