module Falcon::Environment::Redirect
def environments
The services we will redirect to.
def environments [] end
def hosts
def hosts hosts = {} environments.each do |environment| evaluator = environment.evaluator if environment.implements?(Falcon::Environment::Application) Console.info(self) {"Redirecting #{self.url} to #{evaluator.authority}"} hosts[evaluator.authority] = evaluator end end return hosts end
def middleware
def middleware Middleware::Redirect.new(Middleware::NotFound, hosts, redirect_endpoint) end
def redirect_endpoint
def redirect_endpoint Async::HTTP::Endpoint.parse(redirect_url) end
def redirect_url
def redirect_url "https://[::]:443" end