class Falcon::Controller::Redirect

def endpoint

def endpoint
	@command.endpoint.with(
		reuse_address: true,
	)
end

def initialize(command, **options)

def initialize(command, **options)
	super(command, **options)
	
	@hosts = {}
end

def load_app

def load_app
	return Middleware::Redirect.new(Middleware::NotFound, @hosts, @command.redirect_endpoint)
end

def name

def name
	"Falcon Redirect Server"
end

def start

def start
	configuration = @command.configuration
	
	services = Services.new(configuration)
	
	@hosts = {}
	
	services.each do |service|
		if service.is_a?(Service::Proxy)
			@hosts[service.authority] = service
		end
	end
	
	super
end