Move gzip middleware to a better place
This commit is contained in:
parent
7f90f38b1e
commit
40f3bc0de4
|
@ -9,7 +9,6 @@
|
||||||
[compojure.route :as route]
|
[compojure.route :as route]
|
||||||
[ring.middleware.json :refer [wrap-json-params]]
|
[ring.middleware.json :refer [wrap-json-params]]
|
||||||
[ring.middleware.keyword-params :refer [wrap-keyword-params]]
|
[ring.middleware.keyword-params :refer [wrap-keyword-params]]
|
||||||
[ring.middleware.gzip :refer [wrap-gzip]]
|
|
||||||
[commiteth.env :refer [defaults]]
|
[commiteth.env :refer [defaults]]
|
||||||
[mount.core :as mount]
|
[mount.core :as mount]
|
||||||
[commiteth.middleware :as middleware]))
|
[commiteth.middleware :as middleware]))
|
||||||
|
@ -35,5 +34,5 @@
|
||||||
:title "page not found"})))))
|
:title "page not found"})))))
|
||||||
|
|
||||||
|
|
||||||
(defn app [] (-> (middleware/wrap-base #'app-routes)
|
(defn app []
|
||||||
wrap-gzip))
|
(middleware/wrap-base #'app-routes))
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
[ring.middleware.flash :refer [wrap-flash]]
|
[ring.middleware.flash :refer [wrap-flash]]
|
||||||
[immutant.web.middleware :refer [wrap-session]]
|
[immutant.web.middleware :refer [wrap-session]]
|
||||||
[ring.middleware.defaults :refer [site-defaults wrap-defaults]]
|
[ring.middleware.defaults :refer [site-defaults wrap-defaults]]
|
||||||
|
[ring.middleware.gzip :refer [wrap-gzip]]
|
||||||
[buddy.auth.middleware :refer [wrap-authentication wrap-authorization]]
|
[buddy.auth.middleware :refer [wrap-authentication wrap-authorization]]
|
||||||
[buddy.auth.backends.session :refer [session-backend]]
|
[buddy.auth.backends.session :refer [session-backend]]
|
||||||
[buddy.auth.accessrules :refer [restrict]]
|
[buddy.auth.accessrules :refer [restrict]]
|
||||||
|
@ -91,4 +92,5 @@
|
||||||
(assoc-in [:security :anti-forgery] false)
|
(assoc-in [:security :anti-forgery] false)
|
||||||
(dissoc :session)))
|
(dissoc :session)))
|
||||||
wrap-context
|
wrap-context
|
||||||
|
wrap-gzip
|
||||||
wrap-internal-error))
|
wrap-internal-error))
|
||||||
|
|
Loading…
Reference in New Issue