-
Notifications
You must be signed in to change notification settings - Fork 60
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
Share same context between 'limit' and 'ttl' #1576
Comments
So I see two options here:
I'm leaning towards the optional |
Option 2 looks nice. I hope you find a proper way to implement it! And I have another question. I applied JWTGaurd globally and It put the user to ExecutionContext and then I can get the user as a param in the controller. Can I do something similar in throttler module?
GetUser
|
That would entirely depend on when the |
Thank you:) Is there a way to change the order of Guard invocation? |
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
Below is my throttler module code. I used identical code for both the "ttl" and "limit" functions, resulting in fetching the same data from the database twice. Is there a way to share the ExecutionContext between the "limit" and "ttl" functions to avoid this duplication?
const expressPass = request.expressPass
The text was updated successfully, but these errors were encountered: