remote_ip (ActionController::AbstractRequest)

    # File lib/action_controller/request.rb, line 93
        def remote_ip
          return @env['HTTP_CLIENT_IP'] if @env.include? 'HTTP_CLIENT_IP'

          if @env.include? 'HTTP_X_FORWARDED_FOR' then
            remote_ips = @env['HTTP_X_FORWARDED_FOR'].split(',').reject do |ip|
                ip =~ /^unknown$|^(10|172\.(1[6-9]|2[0-9]|30|31)|192\.168)\./i
            end

            return remote_ips.first.strip unless remote_ips.empty?
          end

          @env['REMOTE_ADDR']
        end