This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-08
Channels
- # announcements (6)
- # atom-editor (1)
- # babashka (21)
- # beginners (70)
- # clerk (4)
- # clj-kondo (71)
- # clj-yaml (1)
- # clojure (54)
- # clojure-art (1)
- # clojure-denmark (1)
- # clojure-dev (1)
- # clojure-doc (1)
- # clojure-europe (31)
- # clojure-nl (1)
- # clojure-norway (41)
- # clojure-uk (15)
- # clojurescript (36)
- # conjure (1)
- # cursive (2)
- # datomic (14)
- # duct (10)
- # emacs (12)
- # etaoin (176)
- # gratitude (25)
- # hyperfiddle (17)
- # jobs (1)
- # juxt (5)
- # london-clojurians (1)
- # malli (3)
- # nbb (21)
- # off-topic (29)
- # reitit (12)
- # releases (2)
- # remote-jobs (7)
- # shadow-cljs (9)
- # testing (9)
Is there a built in function to transform all the keys in a schema using a function (e.g to transform dash to underscore) or should I use a schema walker?
I mean transforming the schema definition itself, as opposed to the value.
Does anyone have most recent reitit with CORS enabled and code how to do it? This doesn't seem to be working anymore and i really can't spend hours on this again. https://clojurians.slack.com/archives/C7YF1SBT3/p1671827643059279?thread_ts=1671806291.270689&cid=C7YF1SBT3
This always works for me: https://github.com/dharrigan/startrek/blob/master/src/startrek/shared/middleware/cors.clj
Oh i see that you updated it. I might steel all of it to be honest and just plug it in. I will let you know if all goes well. Thanks!
🙇 I'd also like to mention that i moved CORS at the beginning of the middleware chain and it seems that it solved the issue. How it worked with other service which had ring-cors at the end of the chain - i have no clue. Felling quite stupid at the moment. Thanks a lot for your time and generosity @U11EL3P9U
I have ring-cors as a middleware at the ring handler level:
(defn handler [components]
(ring/ring-handler
(router components)
(constantly {:status 404 :body "Not Found"})
{:middleware [middleware/wrap-cors
(middleware/wrap-resources components)]}))
and
::ring/default-options-endpoint nil
in the router options.