1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/config/initializers/rack_attack.rb

10 lines
303 B
Ruby
Raw Normal View History

2018-12-05 17:29:31 -05:00
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
2018-12-13 18:58:11 -05:00
Rack::Attack.throttle 'req/ip', limit: 120, period: 60, &:ip
Rack::Attack.throttle 'user/email', limit: 20, period: 60 do |req|
req.params['email'].presence if req.post? && req.path.start_with?('/users')
end