lib/logtail-rack/util/request.rb
# We store strings as constants since they are reused on a per request basis.
# This avoids string allocations.
We store strings as constants since they are reused on a per request basis.
This avoids string allocations.
We store strings as constants since they are reused on a per request basis . This avoids string allocations .
def ip
        @ip ||= if @env[REMOTE_IP_KEY_NAME]
          @env[REMOTE_IP_KEY_NAME].to_s || super
        else
          super
        end
      end
def ip @ip ||= if @env [ REMOTE_IP_KEY_NAME ] @env [ REMOTE_IP_KEY_NAME ] . to_s || super else super end end
We store strings as constants since they are reused on a per request basis.
We store strings as constants since they are reused on a per request basis .