mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 06:56:23 +02:00
Add rate limiting to all EPP actions
This commit is contained in:
parent
1a8d8b52e7
commit
fb60466194
14 changed files with 629 additions and 2 deletions
|
@ -5,7 +5,7 @@ module Epp
|
|||
before_action :find_contact, only: [:info, :update, :delete]
|
||||
before_action :find_password, only: [:info, :update, :delete]
|
||||
|
||||
THROTTLED_ACTIONS = %i[info renew update transfer delete].freeze
|
||||
THROTTLED_ACTIONS = %i[info check create renew update transfer delete].freeze
|
||||
include Shunter::Integration::Throttle
|
||||
|
||||
def info
|
||||
|
|
|
@ -6,7 +6,7 @@ module Epp
|
|||
before_action :set_paper_trail_whodunnit
|
||||
before_action :parse_schemas_prefix_and_version
|
||||
|
||||
THROTTLED_ACTIONS = %i[info renew update transfer delete].freeze
|
||||
THROTTLED_ACTIONS = %i[info create check renew update transfer delete].freeze
|
||||
include Shunter::Integration::Throttle
|
||||
|
||||
def info
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
module Epp
|
||||
class PollsController < BaseController
|
||||
THROTTLED_ACTIONS = %i[poll].freeze
|
||||
include Shunter::Integration::Throttle
|
||||
|
||||
def poll
|
||||
authorize! :manage, :poll
|
||||
req_poll if params[:parsed_frame].css('poll').first['op'] == 'req'
|
||||
|
|
|
@ -3,6 +3,9 @@ module Epp
|
|||
skip_authorization_check only: [:hello, :login, :logout]
|
||||
before_action :set_paper_trail_whodunnit
|
||||
|
||||
THROTTLED_ACTIONS = %i[login].freeze
|
||||
include Shunter::Integration::Throttle
|
||||
|
||||
def hello
|
||||
render_epp_response('greeting')
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue