HAProxy equivalent of the following nginx

Hello, I have tried for a couple days to try to translate this into a configuration for HAProxy and I managed to make it sorta work, but it doesn’t. It seems websocket connections timeout, I think. The responses are 200OK. But in fact the software fails. I don’t believe there’s anything wrong with the software, as other modalities work. I am particularly struggling with ```
proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade;