               ;; Root for resource interceptor that is available by default.
               ::http/resource-path "/public"
               ;; session as encrypted cookie
-              ::http/enable-session {:store (cookie/cookie-store {:key key :readers clojure.core/*data-readers*})}
+              ::http/enable-session {:store (cookie/cookie-store {:key session-key :readers clojure.core/*data-readers*})}
 
               ;; Either :jetty, :immutant or :tomcat (see comments in project.clj)
               ::http/type :jetty

   (fn [context]
     (if (ok? context)
       (let [session (or (get-in context [:request :session]) {})]
         (assoc-in context [:response :session] (extend session)))
       context))})

(def add-user-to-session

;      ^:interceptors [(body-params/body-params) http/html-body]
;      ["/about" {:get about-page}]]]])

(def ^:private session-key (DatatypeConverter/parseHexBinary (:subticket-secret-key env)))
;; Consumed by subticket.server/create-server
;; See http/default-interceptors for additional options you can configure
(def service {:env :prod
