Via::Routing::Router
Inherits Reference < Object
Selects a route without depending on HTTP server or client types.
Paths use segment-aware prefix matching. The longest matching path wins; for equal paths an exact host route wins over a hostless route. Remaining ties preserve configuration order.
Constructors
new(routes : Enumerable(Route))
SourceClass methods
normalize_hostname(hostname : String) : String
Sourcenormalize_request_host(authority : String | Nil) : String | Nil
SourceInstance methods
match(host : String | Nil, path : String) : Route | Nil
Source