about summary refs log tree commit diff
path: root/config/initializers/trusted_proxies.rb
blob: 27e9ee03961005ec9b7e7b83ec6e6c0d254f211d (plain) (blame)
1
2
3
4
5
6
7
module Rack
  class Request
    def trusted_proxy?(ip)
      Rails.application.config.action_dispatch.trusted_proxies.any? { |proxy| proxy === ip }
    end
  end
end