The code powering m.abunchtell.com https://m.abunchtell.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

12 lines
274 B

  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