class ActionDispatch::HostAuthorization::Permissions
def sanitize_string(host)
def sanitize_string(host) if host.start_with?(".") /\A#{SUBDOMAIN_REGEX}?#{Regexp.escape(host[1..-1])}#{PORT_REGEX}?\z/i else /\A#{Regexp.escape host}#{PORT_REGEX}?\z/i end end