trusted_proxies.rb 274 B

1234567891011
  1. module Rack
  2. class Request
  3. def trusted_proxy?(ip)
  4. if Rails.application.config.action_dispatch.trusted_proxies.nil?
  5. super
  6. else
  7. Rails.application.config.action_dispatch.trusted_proxies.any? { |proxy| proxy === ip }
  8. end
  9. end
  10. end
  11. end