Apply middleware only to requests matching the given path predicate. $$\text{routed} : (\text{Request} \to \text{Bool}) \to \text{Middleware} \to \text{Middleware}$$
Equations
Instances For
Apply middleware only to requests with the given path prefix. $$\text{routedPrefix} : \text{String} \to \text{Middleware} \to \text{Middleware}$$
Equations
- Network.Wai.Middleware.routedPrefix pathPrefix middle = Network.Wai.Middleware.routed (fun (req : Network.Wai.Request) => req.rawPathInfo.startsWith pathPrefix) middle
Instances For
Routing with always-true predicate applies the middleware.
Routing with always-false predicate is identity.