Open bmaddy opened 9 years ago
:+1: my understanding of all of the cookie fields is a little rusty, but I do think for a proxy server, being a bit "looser" with spec adherence makes sense.
Alternatively, one could delete the keys in the tailrecursion.ring-proxy/prepare-cookies
function. (which I also did successfully for my use-cases).
Just curious @webmonarch is there some way to override this implementation easily as you mentioned above? I want to make sure I'm not missing a neat piece of clojure. The only thing I can think of is a fork in my own repo to implement the desired cookie behavior.
hey @aft-luke, yeah, nothing neat that I know of. I forked for our internal projects. The code is pretty small so a good ol' copy + paste would probably work too.
Good luck!
Thanks @webmonarch. I ended up writing my own handler that's 80% copy/paste as well.
This switches to use clj-http's
wrap-cookies
instead of ring's because their formats have diverged. clj-http returns cookies something like this:but ring no longer accepts
:discard
and:version
as shown here: https://github.com/ring-clojure/ring/commit/c05004fcb2227e75f2299ac7e6d8d9a4aefdb002#diff-c055e0aeef031084c68bf6da304ed4f7L25This leads to the following error when there is cookie info in the response: