1. Caddy version (caddy version
):
2.2.2
2. How I run Caddy:
I run caddy as a simple reverse-proxy pointing to a nodeJS server
my_url
reverse_proxy 127.0.0.1:PORT_NUMBER
a. System environment:
Ubuntu 18.04
All ports closed via FireWall except 80/443
b. Command:
caddy start
d. My complete Caddyfile or JSON config:
my_url
reverse_proxy 127.0.0.1:PORT_NUMBER
3. The problem I’m having:
On my nodeJS server im running a StrapiHeadless CMS. I implemented a custm socket.io logic directly into strapi. This was working localy on development. The host for strapi is set to 127.0.0.1 (to only listen to the traffic procied from Caddy).
Now, with Caddy as the RP, I can no longer make a connection to my socket.io server.
The docs state that websockets get proxied without problems, but seems like I might need additional info in my caddyfile.
When I try to connect to wss://myurl I get a short moment before getting a “this is not possible” from my client.
4. Error messages and/or full log output:
5. What I already tried:
Using ws and wss protocoll. (Not working)
Disabling the Firewall (Not Working)
Disabling Firewall/Opening Direct Port and setting host to 0.0.0.0 and connection directly to the NodeJS Server (Worked. But not the idea)