I am running an instance of wallet connect bridge, which runs at localhost:8887 and have my domain DNS pointed at my server ipv4. I am using caddy to reverse_proxy the domain. Everything works absolutely fine from mobile browsers Chrome and Safari, but from desktop browsers Chrome/Firefox I get the websocket connection error. What changes do I need to make to my caddy file to allow the websocket connection?
4. Error messages and/or full log output:
WebSocket connection to 'wss://bridge.mydomain.com/' failed: Error during WebSocket handshake: Unexpected response code: 404
There’s nothing to change in the Caddyfile, that’s the way to do it. The 404 is most likely coming from your upstream app. It’s hard to say why. Make sure that your upstream app isn’t expecting to see a different Host header, or possibly something else.
You’re right, definitely a bug upstream of Caddy. If I restart my machine every works seamlessly on desktop (mobile was never an issue). I can reintroduce the bug if I fire up a web3modal QR code but never connect to it on my device - super weird.