This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-03
Channels
- # aws (1)
- # bangalore-clj (3)
- # beginners (3)
- # boot (9)
- # business (1)
- # cljs-dev (72)
- # cljsjs (7)
- # clojure (86)
- # clojure-austin (1)
- # clojure-belgium (4)
- # clojure-brasil (14)
- # clojure-conj (3)
- # clojure-dev (10)
- # clojure-italy (4)
- # clojure-poland (14)
- # clojure-russia (36)
- # clojure-spec (144)
- # clojure-uk (50)
- # clojurebridge (1)
- # clojurescript (160)
- # clr (2)
- # core-async (8)
- # cursive (56)
- # datomic (34)
- # devcards (3)
- # emacs (2)
- # ethereum (1)
- # events (3)
- # hoplon (21)
- # jobs (2)
- # leiningen (9)
- # luminus (3)
- # off-topic (1)
- # om (26)
- # onyx (42)
- # pedestal (29)
- # protorepl (1)
- # re-frame (43)
- # reagent (26)
- # rethinkdb (4)
- # ring-swagger (4)
- # spacemacs (5)
- # specter (4)
- # untangled (102)
- # vim (43)
- # yada (10)
hi there! i'm trying to make simple proxy endpoint in my service, and write it like this
(defn image-proxy [request]
(-> request
(get-in [:params :url])
(client/get)
(deref)
(select-keys [:status :headers :body])
(update :headers #(encore/map-keys name %))))
(def routes #{["/proxy" :get [`proxy]]})
But when I visit http://localhost:8080/proxy?url=http://google.com I get an error:
`I plan to use this proxy endpoint to convey images to my app's canvas. To allow canvas to be snapshotted they must come from my domain, thus need for proxy
Could you try the same thing with Jetty as the container? Just to see if it’s specific to Undertow
I think the issue is that when you do (select-keys) from the Google response, you’re picking up the Content-Length header. But the body is somehow now exactly the same length.
I’d be concerned about some of the other headers that Google offers… like the privacy policy. IDK if it’s legit to just pass that along.