ronda.routing.meta-middleware
meta-middleware
added in 0.2.1
(meta-middleware handler middleware-key wrap-fn)
If routing metadata is available, builds a (memoized) handler using `(wrap-fn handler route-id metadata)` and routes the request to it. The middleware data is expected at `[:meta :middlewares k]` of the routing metadata attached by `wrap-routing` and the middleware itself is supposed to be activated using `enable-middlewares`. Note that even `nil` metadata is allowed an will be passed to `wrap-fn`. If `wrap-fn` returns `nil`, no middleware will be applied.