Helper to generate response headers #638
itskingori
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Provides a handy helper to help generate the response headers either based off throttle data e.g.
env['rack.attack.match_data']
or evenenv['rack.attack.throttle_data'][throttle_name]
.To note, this is related to the discussion in #191 (and maybe #29) but since it's just a helper, it's all opt-in i.e. no opinions on whether you should generate the headers or not (or even where) ... you choose to use the helper if/when/where you want it.
Usage Examples
It can be used in the controller to set response headers (Rails example) ...
Or it can be used in
throttled_response
...Beta Was this translation helpful? Give feedback.
All reactions