Optional middleware to enhance routing in Compojure.
Remove the trailing ‘/’ from a URI string, if it exists.
(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.