instance method first_non_proxy

Ruby on Rails edge

Since edge Private — implementation detail, not part of the public API

Signature

first_non_proxy(ips)

No documentation comment.

Parameters

ips req
Source
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 198
      def first_non_proxy(ips) # :doc:
        ips.find do |raw_ip|
          return unless raw_ip

          ip = IPAddr.new(raw_ip)
          @proxies.none? do |proxy|
            if proxy.is_a?(IPAddr)
              proxy.include?(ip)
            else
              proxy === raw_ip
            end
          end
        end
      end

Defined in actionpack/lib/action_dispatch/middleware/remote_ip.rb line 198 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionDispatch::RemoteIp::GetIp

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close