Clojure / Noir: Force HTTPS, redirect if the request was http:// to https://
I'm trying to force SSL on my site. I want to have a ring style middle-ware to redirect the site to the same URL with https if it is only http I wrote the following code but it doesn't really do anything besides check the request scheme and print the URL it should be redirecting to. (defn https-url [request-url] (str (str (str (str "https://" (:server-name request-url) ":") (:server-port request-url))) (:uri request-url))) (defn require-https [handler] (fn [request] (let [page-request (handler request)] (if (= (:scheme page-request) :http) (println (https-url page-request)))))) (server/add