How do I add cookies?
I tried adding io.pedestal.http.ring-middlewares/cookies
interceptor and then adding :cookies
field to response:
{:status 200
:cookies {"a" {:value ""}
"b" {:value ""}
"c" {:value ""}}
but it does not workAnd also:
(def set-some-cookies-interceptor
(fn [request]
{:status 200
:headers {"Set-Cookie" "a=; b=;"}})))
only sets the a
cookie, not b
FYI this works:
{:headers {"Set-Cookie" ["a=; path=/;" "b=; path=/;"]}}
Thanks to @orestisThanks to MDN 😄