Context
I’ve looked at the top three results on Google for “Clojure, Ring, SSL”, and there does not appear to be a consensus for “the right way” to setup SSL with Clojure + Ring.
Question:
The ideal answer would be something of the form:
1) Include “blahblahblah -version xyz” in your project.clj
2) Place your ssl certificate at
3) Make modify your ring-handler with:
wrap-ring-handler …
However, if that’s not possible, the optimal solution would work too. 🙂
Thanks!
I would recommend that you front your app with something like Apache2 or nginx. Use that server to terminate the SSL and proxy to your app. Terminating SSL in Apache2 is as simple as specifying the certificate. Proxying with Apache2 is also easy. This is much more flexible than writing code into your app for terminating SSL.