logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

trusted_proxies.rb (274B)


  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