Route templates: a route named x-* serves any request route x-<something>
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
This commit is contained in:
@@ -173,7 +173,9 @@ func (hx *handler) routesGet(w http.ResponseWriter, r *http.Request) {
|
||||
func (hx *handler) routeView(route string, hosts []string, defaultModel string, snap []lease.Lease) RouteView {
|
||||
leases := make([]LeaseView, 0)
|
||||
for _, l := range snap {
|
||||
if l.Route == route {
|
||||
// A concrete route lists under the exact key it matches, or the longest
|
||||
// template that matches it; a template's row is every such lease.
|
||||
if _, key, ok := hx.cfg.Route(l.Route); ok && key == route {
|
||||
leases = append(leases, leaseView(l))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user