This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-03
Channels
- # adventofcode (2)
- # announcements (1)
- # asami (35)
- # babashka (67)
- # beginners (97)
- # cherry (3)
- # clj-yaml (3)
- # cljsrn (9)
- # clojure (44)
- # clojure-dev (34)
- # clojure-europe (13)
- # clojure-gamedev (1)
- # clojure-norway (10)
- # clojure-uk (2)
- # clojurescript (24)
- # clr (1)
- # conjure (18)
- # cursive (4)
- # datalevin (3)
- # emacs (6)
- # graalvm (9)
- # graphql (1)
- # introduce-yourself (1)
- # malli (7)
- # nrepl (3)
- # portal (1)
- # quil (2)
- # reagent (1)
- # reitit (21)
- # releases (1)
- # reveal (11)
- # ring (2)
- # shadow-cljs (17)
- # sql (24)
- # vim (4)
I was having issues with reitit parameter parsing so I reverted to compojure for some sanity checks and the same thing is happening:
(http/run-server
(routes
(-> router/routes ;; compojure (defroutes ...)
(wrap-defaults (-> site-defaults
(assoc-in [:session :cookie-attrs :same-site] :lax)
(assoc-in [:security :anti-forgery] false)))))
{:port port :join? false}))))
the resulting :form-params
are not keywordized, even though the site-defaults
have it as true
. Adding an explicit (assoc-in [:params :keywordize] true)
did not change this output.
Since this is happening with both reitit and compojure on my machine, could it be a ring issue? Maybe some other lib? I have no other middleware at allFrom the wrap-keyword-params
docstring: https://github.com/ring-clojure/ring/blob/master/ring-core/src/ring/middleware/keyword_params.clj#L37-L42
(defn wrap-keyword-params
"Middleware that converts the any string keys in the :params map to keywords.
Only keys that can be turned into valid keywords are converted.
This middleware does not alter the maps under :*-params keys. These are left
as strings.