I'm trying to build a simple web site using Clojure / Compojure and want to feed apply a servlet filter to the request / response (i.e. a standard javax.servlet.Filter instance).
e.g. if the current source code is:
(defroutes my-app
(GET "/*"
(html [:h1 "Hello Foo!!"]))
)
I would like to add a filter like this:
(defroutes my-app
(GET "/*"
(FILTER my-filter-name
(html [:h1 "Hello Foo!!"])))
)
Where my-filter-name is some arbitrary instance of javax.servlet.Filter.
Any idea how to do this effectively and elegantly?