 (ns forces-assemble.handler
   (:require [compojure.core :refer :all]
             [compojure.route :as route]
-            [ring.middleware.defaults :refer [wrap-defaults site-defaults]]
+            [ring.middleware.defaults :refer [wrap-defaults secure-api-defaults site-defaults]]
             [ring.adapter.jetty :as jetty]
             [environ.core :refer [env]]
             [monger.core :as mg]

  (route/not-found "Not Found"))

(def app
  (wrap-defaults app-routes site-defaults))

(def handler
  (-> app-routes


(defn def-server []
  (def server
    (jetty/run-jetty #'app
                     {:port 8000
                      :join? false
                      :ssl? true
                      :ssl-port 8443
                      :keystore (str (env :home) "/jetty.keystore")
                      :key-password (env :jetty-keystore-password)})))
