Alright so, I got the redirect to https and www when either one of them is not present to work (requires the Coast web framework for Clojure) with the following code (running the action inside a request, passing the action the request)

... And it works, fine, on a local machine. But once deployed, into an uberjar, no longer does. 😞