Compojure uses the compojure.response/render protocol method to turn values like URLs into Ring responses. So you could write:
(-> (io/resource "public/html/confirm.html")
(compojure.response/render)
(response/header "X-Foo" "Bar"))
Or you could use some middleware, if the header is standard across your application. Or since you know that you're delivering a HTML file, you could also write:
(-> (response/resource-response "public/html/confirm.html")
(response/content-type "text/html; charset=utf-8")
(response/header "X-Foo" "Bar"))
That should result in the same thing, as the only thing Compojure does that Ring doesn't is try to make an educated guess about the content type.
- James