The workbench failed to connect to the server (Error: WebSocket close with status code 1006)

Hello I am trying to connect a remote machine to the WEB IDE, but I am getting the following error

I am using an ubuntu vps

Use this configuration in nginx

server {
server_name remote.demo.com;

location / {
  proxy_pass http://localhost:3443;
  proxy_set_header Host $host;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
  proxy_set_header Accept-Encoding gzip;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_http_version 1.1;
}

}

Also enable Websockets on cloudflare

I followed the steps in this guide: