Optional middleware to enhance routing in Compojure.
Optional middleware to enhance routing in Compojure.
(remove-trailing-slash uri)
Remove the trailing '/' from a URI string, if it exists.
Remove the trailing '/' from a URI string, if it exists.
(wrap-canonical-redirect handler)
(wrap-canonical-redirect handler make-canonical)
Middleware that permanently redirects any non-canonical route to its
canonical equivalent, based on a make-canonical function that changes a URI
string into its canonical form. If not supplied, the make-canonical function
will default to remove-trailing-slash
.
Middleware that permanently redirects any non-canonical route to its canonical equivalent, based on a make-canonical function that changes a URI string into its canonical form. If not supplied, the make-canonical function will default to [[remove-trailing-slash]].
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close