This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-18
Channels
- # bangalore-clj (1)
- # beginners (60)
- # boot (98)
- # cider (8)
- # clojure (158)
- # clojure-dusseldorf (16)
- # clojure-france (3)
- # clojure-hamburg (2)
- # clojure-mke (2)
- # clojure-russia (11)
- # clojure-serbia (1)
- # clojure-spec (123)
- # clojure-uk (59)
- # clojurescript (44)
- # code-reviews (16)
- # community-development (51)
- # core-async (46)
- # cryogen (1)
- # cursive (9)
- # datascript (5)
- # datomic (36)
- # emacs (3)
- # events (12)
- # hoplon (57)
- # jobs (1)
- # juxt (3)
- # klipse (55)
- # lein-figwheel (3)
- # leiningen (5)
- # luminus (3)
- # off-topic (8)
- # om (75)
- # om-next (9)
- # onyx (17)
- # pedestal (7)
- # portland-or (3)
- # proton (36)
- # protorepl (6)
- # re-frame (3)
- # reagent (33)
- # remote-jobs (1)
- # ring (23)
- # ring-swagger (2)
- # rum (1)
- # specter (1)
- # untangled (36)
- # yada (11)
given that it can be a bit tricky to properly determine what the "real" remote ip of the client is, does yada provide a mechanism for this ? there is of course :request :remote-addr, but then also the x-forwarded-for headers, which can in turn contain multiple ip addresses separated by a comma
https://github.com/ring-clojure/ring-headers/blob/master/src/ring/middleware/proxy_headers.clj is the ring one
You always want to count from the end of the remote-addr list, not the front
as the client controls what gets put on the front
depending on how many layers of proxies you have you slice the last or second to last off
(as you probably are already aware)
@lmergen yes, there is an interceptor that determines the correct one and fishes it out into the ctx. Of course, the entire Ring request is available as :request in ctx so you can use Ring middleware too
ah where can i find that interceptor ? I tried searching a bit through the repo but couldnt find anything useful
noob question please: I'm attempting to add yada to an existing project, with a simple test route. Whether with bidi or compojure, I'm seeing an error when compiling:
java.lang.ClassNotFoundException: io.netty.channel.epoll.Epoll, compiling:(aleph/netty.clj:1:1)
...
From what I can see, aleph and netty jars/packages were pulled in OK when yada 1.2.0 was added. Any suggestions?@limist you're getting the wrong version of netty I think. You've probably got dependency conflicts.
@limist https://github.com/technomancy/leiningen/issues/1055 This came up on Google, on mobile else I'd type up most of it :)