This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-23
Channels
- # adventofcode (13)
- # announcements (7)
- # atom-editor (2)
- # babashka (6)
- # beginners (77)
- # biff (2)
- # calva (14)
- # cider (25)
- # circleci (2)
- # clj-on-windows (39)
- # clojars (1)
- # clojure (36)
- # clojure-belgium (4)
- # clojure-europe (78)
- # clojure-norway (25)
- # clojure-spec (1)
- # clojurescript (11)
- # clr (1)
- # cursive (1)
- # datahike (43)
- # datomic (6)
- # dev-tooling (3)
- # emacs (5)
- # exercism (1)
- # jobs (1)
- # jobs-discuss (3)
- # kaocha (2)
- # lsp (32)
- # malli (4)
- # music (1)
- # off-topic (14)
- # pathom (4)
- # reitit (14)
- # shadow-cljs (5)
- # tools-deps (3)
- # vim (1)
- # xtdb (5)
Does anyone know how to get cljs-http
to return all headers from a response? My CORS header allow all headers to be sent, yet I'm only getting "content-length" returned in my response map. But when I inspect the XHR response in dev tools, I clearly see "Set-Cookie" headers that I need to access in my cljs code
If those cookies are secure, you can't access them from JS - that's how modern browsers work due to security concerns. If they aren't marked as secure, I'm 70% sure you still can't access them from JS, but I'd have to confirm that.
Looks like I get the same issue with fetch... and I pinned it down to my :credentials
key seemingly not working. Or I am misunderstanding its purpose
(fetch/post endpoint {:credentials :include ...})
is what I am running... it sends the request to backend where I allow all methods, origins, and credentials for CORS, The frontend and backend are separate servers but they run on the same machine, just on a different port.Upon further prying into the backend and how cookies work, I realized this is not a CLJS problem at all. The cookies are being sent from the backend with an HttpOnly
attribute. This makes the token I receive from the server are completely inaccessible from JS. Woops.
Hi guys. Is there a ClojureScript function i can use to convert HTML to Hiccup?
not in core, but you can use a library such as https://github.com/clj-commons/hickory
Thanks.
For one offs
or https://html2hiccup.dev/ which doesn't suffer from the issues: • SVG attributes aren't camel-cased • <a href=""> transforms to invalid hiccup [:a {:href }] • HTML comments should become Clojure comments