Closed tylermmorton closed 6 months ago
I want to work on this issue.
I have one question. Do you want it to be per user or overall ?
Hi @shashank73744! Thanks for taking this on. That is a great question. Currently torque does not have the concept of a user or session. We'll have to lean on identifiers sent via incoming HTTP requests, such as IP address or user agent string. I think picking one of those two would be a great start. Let me know if you need help or have other questions!
Problem:
I often find myself configuring a rate-limiter guard for every route I register with a
torque
app. I think this is a good use case for theGuard
API but if users end up registering the same guard on all of their endpoints, perhaps that is a sign that the guard logic should be implemented internally to torque.Rough outline of solution