Hello, I’m trying to use socket.io to do a really simple chat with websockets. It works when browsing directly to the site (eg :3000), but behind caddy’s proxy it doesn’t seem to keep the websocket alive (I’m not sure if that’s the right description for the issue).
http://i.imgur.com/mRMexk5.png - behind caddy’s proxy
http://i.imgur.com/JwLvVhn.png - direct access
I began reading the websocket
directory page and I stumbled upon this:
Caddy will not make any effort to keep the backend process alive while a client is connected. It is the developer’s responsibility to ensure the program does not terminate until the client is ready to close the connection or would be ready for it to terminate.
Sadly, I don’t know what is meant by this – I tried to send an empty message via socket every 5 seconds but the connection doesn’t stay alive either, this way.
Relevant part of the config:
site.xyz {
proxy / localhost:3000 {
websocket
}
}