# class WebConsole::Request::GetSecureIp

### Public Class Methods

new(req, proxies) click to toggle source

    # File lib/web_console/request.rb, line 32
    def initialize(req, proxies)
      # After rails/rails@07b2ff0 ActionDispatch::RemoteIp::GetIp initializes
      # with a ActionDispatch::Request object instead of plain Rack
      # environment hash. Keep both @req and @env here, so we don't if/else
      # on Rails versions.
      @req      = req
      @env      = req.env
      @check_ip = true
      @proxies  = proxies
    end

### Public Instance Methods

filter_proxies(ips) click to toggle source

    # File lib/web_console/request.rb, line 43
    def filter_proxies(ips)
      ips.reject do |ip|
        @proxies.include?(ip)
      end
    end