You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 3, 2023. It is now read-only.
If there are more than one limiter for same request, then headers X-RateLimit-Limit/X-RateLimit-Remaining can be incorrect. Example:
wrap-ratelimit creates header with Limit=100, Remainig=99 and calls next handler.
Next wrap-ratelimit in the chain creates header Limit=100, Remainig=0 (call is blocked).
wrap-ratelimit from step 1. overwrites X-RateLimit-Limit/X-RateLimit-Remaining.
Expected result: X-RateLimit-Limit=100 / X-RateLimit-Remaining=0
Actual result: X-RateLimit-Limit=100 / X-RateLimit-Remaining=99
Possible solution is to return min values:
If there are more than one limiter for same request, then headers X-RateLimit-Limit/X-RateLimit-Remaining can be incorrect. Example:
wrap-ratelimitcreates header with Limit=100, Remainig=99 and calls next handler.wrap-ratelimitin the chain creates header Limit=100, Remainig=0 (call is blocked).wrap-ratelimitfrom step 1. overwrites X-RateLimit-Limit/X-RateLimit-Remaining.Expected result:
X-RateLimit-Limit=100 / X-RateLimit-Remaining=0Actual result:
X-RateLimit-Limit=100 / X-RateLimit-Remaining=99Possible solution is to return min values: