     (let [cookie-store (ns-resolve 'ring.middleware.session.cookie 'cookie-store)]
       (def session-store (cookie-store)))))
 
-(defn assoc-cookie-conf [defaults]
-  (-> defaults
-      (assoc-in [:session :cookie-name] "braid")
-      (assoc-in [:session :cookie-attrs :secure] (cond
-                                                   (env :http-only)
-                                                   false
-                                                   (= (env :environment) "prod")
-                                                   true
-                                                   :else
-                                                   false))
-      (assoc-in [:session :cookie-attrs :max-age] session-max-age)
-      (assoc-in [:session :store] session-store)))
-
 (defn assoc-csrf-conf [defaults]
   (-> defaults
       (assoc-in [:security :anti-forgery] true)))

   [ring.middleware.defaults :refer [wrap-defaults api-defaults secure-site-defaults site-defaults]]
   [ring.middleware.format :refer [wrap-restful-format]]
   [ring.middleware.edn :refer [wrap-edn-params]]
   [taoensso.timbre :as timbre]))

(def session-max-age (* 60 60 24 365))

               :content-types          true
               :default-charset        "utf-8"}})

(def session-config
  {:cookie-name "braid",
   :cookie-attrs {:secure (cond
                            (env :http-only) false
                            (= (env :environment) "prod") true
                            :else false)
                  :max-age session-max-age},
   :store session-store})

(defn- wrap-log-requests
  [handler]
  (fn [{uri :uri method :request-method :as request}]
