Drop EOL Ruby 2.7 (#24237)
This commit is contained in:
		@@ -98,8 +98,8 @@ class Rack::Attack
 | 
			
		||||
    req.throttleable_remote_ip if req.paging_request? && req.unauthenticated?
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  API_DELETE_REBLOG_REGEX = /\A\/api\/v1\/statuses\/[\d]+\/unreblog\z/.freeze
 | 
			
		||||
  API_DELETE_STATUS_REGEX = /\A\/api\/v1\/statuses\/[\d]+\z/.freeze
 | 
			
		||||
  API_DELETE_REBLOG_REGEX = /\A\/api\/v1\/statuses\/[\d]+\/unreblog\z/
 | 
			
		||||
  API_DELETE_STATUS_REGEX = /\A\/api\/v1\/statuses\/[\d]+\z/
 | 
			
		||||
 | 
			
		||||
  throttle('throttle_api_delete', limit: 30, period: 30.minutes) do |req|
 | 
			
		||||
    req.authenticated_user_id if (req.post? && req.path.match?(API_DELETE_REBLOG_REGEX)) || (req.delete? && req.path.match?(API_DELETE_STATUS_REGEX))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user