     (-> (sz/encode body :json)
         (http/ok {:content-type "application/json"}))))
 
-(defn- redirect-to-api
-  "Endpoint that just redirect to the /api endpoint."
-  [context]
-  (http/see-other "/api"))
-
 (defn- authorization
   [{:keys [identity] :as context}]
   (if identity
     (ct/delegate {:identity (UUID/fromString (:id identity))})
     (http/forbidden (ufc/rsp {:message "Forbidden"}))))
+
+(def cors-conf
+  {:origin "*"
+   :max-age 3600
+   :allow-headers ["X-Requested-With", "Content-Type"]})
 
 (defn app
   []

    (ct/routes
     [[:any (cauth/auth backend)]
      [:any (cmisc/autoreloader)]
      [:prefix "api"
       [:any (cparse/body-params)]
       [:error #'ufe/handler]
       [:post "auth/token" #'ufa/login]
       [:any #'authorization]


       [:put "pages/:id" #'ufp/page-update]
       [:delete "pages/:id" #'ufp/page-delete]
       [:post "pages" #'ufp/page-create]
       [:get "pages" #'ufp/page-list]]])))
