module Roda::RodaPlugins::HostAuthorization::InstanceMethods

def host_authorized?(host, authorized_host = opts[:host_authorization_host])

Whether the host given is one of the authorized hosts for this application.
def host_authorized?(host, authorized_host = opts[:host_authorization_host])
  case authorized_host
  when Array
    authorized_host.any?{|auth_host| host_authorized?(host, auth_host)}
  else
    authorized_host === host
  end
end