This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-02
Channels
Is this a bug? from the code it seems that routers should be able to route based on the :host
of the request, but this breaks the prefix-tree router
(require '[io.pedestal.http.route.prefix-tree :as prefix-tree]
'[io.pedestal.http.route.router :as router])
(def my-router (prefix-tree/router [{:path "/foo/:x"}
{:path "/foo/:x/bar/*rest"}
{:path "/:param" :host ""}]))
(router/find-route my-router {:path-info "/foo/1"}) ;; => nil
(router/find-route my-router {:path-info "/test"}) ;; => nil
(router/find-route my-router {:path-info "/test" :host ""}) ;; => nil
linear-search works as expected