-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support id option #6
Comments
Yea, i see that when PR appears in koa-ratelimit and i'm thinking of it. |
It would be great if you can PR also with tests. |
Its not so easy because of using Hm.. okey, I'll look what can I create, as soon as possible. PRs welcome. |
@jedahan why you want to use |
I'm confused what does |
Right.
It's simple, just limiting the requests per ip. And if he dont need to define custom error msgs, blacklisting ips, dont need db saving and etc, he should use some other simpler middleware |
Im thinking of to decouple it to separate modules at some point or concept for adding middleware to this middleware - i think it would be good. At this point we have tj's node-ratelimiter, but i believe it can be simpler. |
Ahh yes. That makes sense. Any middleware that can take a function, and yield a 429 ratelimit would do. Much simpler. Thanks for being patient explaining this to me. |
No worries. Try middlewares such as |
@jedahan I'll do this tonight and will release v3.0.0, because significant refactoring of the codebase and following I'll start in clear v3 branch, stay tuned. Thank you guys! |
@tunnckoCore Do you have an ETA on when you plan on making v3 live? I need this feature as my server is sitting behind a load balancer and the IP address I need to rate limit is stored in X-Forwarded-For header. |
maximum the end of the week. you may want to review https://github.com/tunnckoCore/koa-ip-filter |
+1. Would love to see this feature. |
Finally, v3 will come maximum at the end of the week. After I finish helapkg/hela#34. |
I want to be able to set up my own custom id functions, like in koa-ratelimit:
In particular, I am trying to limit the rate of my entire application, not just per-user, so my custom id function might look like:
The text was updated successfully, but these errors were encountered: