Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
frenchy64 committed May 1, 2024
1 parent 5faa03b commit c809b5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
8 changes: 4 additions & 4 deletions src/compojure/api/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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#))))
Expand Down

0 comments on commit c809b5f

Please sign in to comment.