Sha256: 9bb4bc293e8236563b154c8c311b10c29248a63c01103bcde47d32ebd0673832
Contents?: true
Size: 399 Bytes
Versions: 5
Compression:
Stored size: 399 Bytes
Contents
require "rack/attack" module Ahoy class Throttle < Rack::Attack throttle("ahoy/ip", limit: Ahoy.throttle_limit, period: Ahoy.throttle_period) do |req| if req.path.start_with?("/ahoy/") req.ip end end def_delegators self, :whitelisted?, :blacklisted?, :throttled?, :tracked? def self.throttled_response Rack::Attack.throttled_response end end end
Version data entries
5 entries across 5 versions & 1 rubygems