This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-03
Channels
- # beginners (98)
- # boot (18)
- # chestnut (2)
- # cider (90)
- # cljdoc (3)
- # cljs-dev (1)
- # clojure (64)
- # clojure-dev (14)
- # clojure-dusseldorf (4)
- # clojure-italy (11)
- # clojure-nl (5)
- # clojure-spec (9)
- # clojure-uk (69)
- # clojurescript (63)
- # code-reviews (2)
- # core-logic (20)
- # cursive (13)
- # datomic (52)
- # dirac (2)
- # emacs (4)
- # figwheel (6)
- # hyperfiddle (13)
- # luminus (4)
- # nrepl (1)
- # off-topic (7)
- # onyx (9)
- # overtone (3)
- # parinfer (3)
- # pedestal (1)
- # re-frame (31)
- # reagent (74)
- # reitit (34)
- # rum (3)
- # shadow-cljs (51)
- # spacemacs (22)
- # specter (7)
- # tools-deps (23)
- # uncomplicate (3)
- # vim (9)
How would you apply middleware to the contexts in this case instead of up a level where you pass service-routes api to a middleware? Or would you break the contexts out of the api?
with compojure-api 2.* you can set :middleware
option to api
(besides context
or endpoint. Something like:
(def service-routes
(api
{:middleware [...]}
(context "/unsecured"
:middleware [...]
(GET "/ping []
:middleware [...]
(ok)))))
(defapi is deprecated in 2.*)I wonder if context has :middleware [print-middleware-3 print-middleware-4] from this https://github.com/metosin/compojure-api/wiki/Middleware