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

9 lines
303 B
Ruby

# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
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