Method: Falcon::Middleware::Proxy#lookup

Defined in:
lib/falcon/middleware/proxy.rb

#lookup(request) ⇒ Object

Lookup the appropriate host for the given request.



79
80
81
82
83
84
# File 'lib/falcon/middleware/proxy.rb', line 79

def lookup(request)
	# Trailing dot and port is ignored/normalized.
	if authority = request.authority&.sub(/(\.)?(:\d+)?$/, "")
		return @hosts[authority]
	end
end