This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-06
Channels
- # aleph (15)
- # beginners (40)
- # boot (14)
- # cider (90)
- # cljs-dev (132)
- # cljsrn (25)
- # clojars (7)
- # clojure (188)
- # clojure-chicago (4)
- # clojure-dusseldorf (1)
- # clojure-greece (9)
- # clojure-italy (43)
- # clojure-russia (16)
- # clojure-sg (7)
- # clojure-spec (39)
- # clojure-uk (81)
- # clojurescript (170)
- # component (5)
- # core-async (7)
- # cursive (49)
- # data-science (65)
- # datascript (3)
- # datomic (27)
- # graphql (3)
- # hoplon (4)
- # instaparse (56)
- # klipse (129)
- # leiningen (1)
- # lumo (28)
- # off-topic (4)
- # om (15)
- # onyx (54)
- # overtone (7)
- # pedestal (7)
- # re-frame (9)
- # reagent (72)
- # ring (33)
- # ring-swagger (2)
- # spacemacs (1)
- # untangled (19)
- # vim (2)
- # yada (12)
Hello guys, I have a problem with Content-Security-Headers being returned and preventing my .js files to be loaded. Where/how can I configure those? Is this something a recent version of Ring is doing, or is it in ring-headers?
@kah0ona Ring doesn’t add any itself, but Ring-Defaults does. Are you using that middleware?
hm it seems to be ring.middleware.x-headers, but that only adds X-Content-Secuirty-Policy headers, rather than the one without X- prefix..
@kah0ona Oh, you mean like Content-Security-Policy
?
So you’re not talking about security headers in general?
X-Content-Security-Policy
is the old name for the header. That should probably be updated.
No problem 🙂 - it can be hard to find which middleware adds which headers.
Or interceptor, in Pedestal’s case.
we use both pedestal and ring in this codebase, i mixed it up. end of the day here… not too sharp 🙂
How do I use middleware? I want to use ring-partial-content, but I'm not sure how to use it. (I'm working on my first ring/clojure/web project, so I don't know much about servers)
@jatkin Middleware takes in a handler as an argument, and returns a handler.
There’s more about it here: https://github.com/ring-clojure/ring/wiki/Concepts#middleware
Hello guys, I am currently facing strange problem that I can build my project with lein repl
or lein ring server
, however when I try lein ring uberwar
I get
Can't import ring.util.response/find-header, try updating to Ring 1.6.0+
Above problem is caused by https://github.com/metosin/ring-http-response/ library. It almost seems like ring-http-response
is being added as dev dependency but I really don't know why 😕Sounds like something is pulling in an older version of Ring as a (transitive) dependency. Try lein deps :tree
to see if you can identify where the older Ring is coming from?
Yeah, I tried that before and nothing seems to collide with ring
or ring/ring-core
Actually it does, weird is that lein deps :tree | less
is actually not giving suggestions by lein
that's why I didn't see it
Ok, even so, I don't really see any offending deps there https://pastebin.com/tPe6qXBH
[lib-noir "0.9.3"] -> [ring-middleware-format "0.4.0"] -> [ring "1.3.0"] -> [ring/ring-devel "1.3.0"] -> [hiccup "1.0.5"]
That’s bringing in an old version of Ring.
You might also want to check which version of lein-ring
you’re using.
I'll look at it, thank you