Orange cloud breaks websocket app

Hellooooooo
Cloudflare and general programming noob here.
I've made a website that relies on a secure websocket server.
When the DNS entry for the subdomain for this server is set to DNS only (grey cloud), the site works fine.
However, when the DNS entry is set to Proxied (orange cloud), the site breaks completely because the websocket fails to connect.
Would anyone be able to assist me in debugging this please? I don't know where to start.
Was this page helpful?