Adding new throttle blocks outside of config file #661
Unanswered
aishbuilds
asked this question in
Questions (Q&A)
Replies: 3 comments
-
|
The only thing i can think of right now that might help with your use case would be storing/keeping some value in the Then in your Rack::Attack.throttle("dashboard", limit: ..., period: ...) do |request|
request.cookies[:user_id]
endfor example. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I hope the above helps :-) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@grzuy, any way you've figured this one out? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I want to dynamically throttle specific users in runtime, from a custom dashboard.
In this case, I cannot define the throttle blocks in the
rack-attack.rbconfig file.When I define the throttle list from the controller, it does not seem to work.
I am unable to find a workaround for this, any idea on how I can get this working?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions