File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 3838 (routes/create nil nil {} nil (partial handle handlers))))
3939
4040(defmacro middleware
41- " Wraps routes with given middleware using thread-first macro.
41+ " Wraps routes with given middlewares using thread-first macro.
4242
4343 Note that middlewares will be executed even if routes in body
4444 do not match the request uri. Be careful with middleware that
4747 :deprecated " 1.1.14"
4848 :superseded-by " route-middleware" }
4949 [middleware & body]
50+ (assert (= " true" (System/getProperty " compojure.api.core.allow-dangerous-middleware" ))
51+ (str " compojure.api.core.middleware is deprecated because of security issues. "
52+ " Please use route-middleware instead. "
53+ " Set compojure.api.core.allow-dangerous-middleware=true to keep using middleware." ))
5054 `(let [body# (routes ~@body)
5155 wrap-mw# (mw/compose-middleware ~middleware)]
5256 (routes/create nil nil {} [body#] (wrap-mw# body#))))
You can’t perform that action at this time.
0 commit comments