Fork me on GitHub
#ring
<
2021-05-26
>
tvaughan18:05:16

Has anyone been able to successfully proxy websockets in a ring app? I can proxy http/s just fine, but I don't know how to handle a websocket

Noah Bogart18:05:24

i’ve had mild success with https://github.com/stalefruits/gniazdo, tho i ddin’t put it in any tests, just a simple script

tvaughan18:05:47

Thanks! Looks like with this the proxy would have to re-create the websocket request. I'll need to maintain a connection pool in the proxy so connections are re-used too. Does that sound right?

Noah Bogart18:05:27

oh, proxy! heck, I don’t know much about that. I interpreted that as “mock” or “stub”, lol

Noah Bogart18:05:44

ie “how do I make fake websocket requests?”

tvaughan18:05:56

Haha ah ok! Sorry I wasn't clear

Noah Bogart18:05:06

nah, it’s my b for jumping to an answer without understanding the question. head empty no thoughts

Noah Bogart18:05:45

that library is very nice tho. works seamlessly with sente, which is our primary websockets library.

👍 3
tvaughan20:05:38

I may be able to use the middleware wrapper in https://github.com/jarohen/chord#clojure ...