From c809b5f18b5214f20414a3bce22313bd129ce095 Mon Sep 17 00:00:00 2001 From: Ambrose Bonnaire-Sergeant Date: Tue, 30 Apr 2024 20:54:12 -0500 Subject: [PATCH] wip --- CHANGELOG.md | 2 ++ src/compojure/api/core.clj | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddc311cc..0fe07c88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## NEXT * Remove potemkin [#445](https://github.com/metosin/compojure-api/issues/445) * backport `route-middleware` +* deprecate `middleware` +* upgrade to ring-swagger 1.0.0 to fix memory leaks ## 1.1.13 (2019-11-02) diff --git a/src/compojure/api/core.clj b/src/compojure/api/core.clj index 024a71fe..12801465 100644 --- a/src/compojure/api/core.clj +++ b/src/compojure/api/core.clj @@ -47,10 +47,10 @@ :deprecated "1.1.14" :superseded-by "route-middleware"} [middleware & body] - (assert (= "true" (System/getProperty "compojure.api.core.allow-dangerous-middleware")) - (str "compojure.api.core.middleware is deprecated because of security issues. " - "Please use route-middleware instead. " - "Set compojure.api.core.allow-dangerous-middleware=true to keep using middleware.")) + (when (not= "true" (System/getProperty "compojure.api.core.suppress-middleware-warning")) + (println (str "compojure.api.core.middleware is deprecated because of security issues. " + "Please use route-middleware instead. middleware will be disabled in a future release." + "Set -dcompojure.api.core.suppress-middleware-warning=true to suppress this warning."))) `(let [body# (routes ~@body) wrap-mw# (mw/compose-middleware ~middleware)] (routes/create nil nil {} [body#] (wrap-mw# body#))))