Move gzip middleware to a better place

This commit is contained in:
Teemu Patja 2017-01-30 17:45:45 +02:00
parent 7f90f38b1e
commit 40f3bc0de4
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
2 changed files with 4 additions and 3 deletions

View File

@ -9,7 +9,6 @@
[compojure.route :as route]
[ring.middleware.json :refer [wrap-json-params]]
[ring.middleware.keyword-params :refer [wrap-keyword-params]]
[ring.middleware.gzip :refer [wrap-gzip]]
[commiteth.env :refer [defaults]]
[mount.core :as mount]
[commiteth.middleware :as middleware]))
@ -35,5 +34,5 @@
:title "page not found"})))))
(defn app [] (-> (middleware/wrap-base #'app-routes)
wrap-gzip))
(defn app []
(middleware/wrap-base #'app-routes))

View File

@ -9,6 +9,7 @@
[ring.middleware.flash :refer [wrap-flash]]
[immutant.web.middleware :refer [wrap-session]]
[ring.middleware.defaults :refer [site-defaults wrap-defaults]]
[ring.middleware.gzip :refer [wrap-gzip]]
[buddy.auth.middleware :refer [wrap-authentication wrap-authorization]]
[buddy.auth.backends.session :refer [session-backend]]
[buddy.auth.accessrules :refer [restrict]]
@ -91,4 +92,5 @@
(assoc-in [:security :anti-forgery] false)
(dissoc :session)))
wrap-context
wrap-gzip
wrap-internal-error))