Cant reach WebSocket (wss) on a different port

I have Traefik running in docker and a Unifi Network Video Recorder running on a different machine at https://192.168.1.102:7443 . I have added following dynamic config to enable TLS for it:

http:
  routers:
    nvr:
      rule: Host(`nvr.example.com`)
      service: nvr
      middlewares:
        - sslheader
      tls: {}
  services:
    nvr:
      loadBalancer:
        servers:
          - url: "https://192.168.1.102:7443"
  middlewares:
    sslheader:
      headers:
        customRequestHeaders:
          X-Forwarded-Proto: https

The service is accessible over HTTPS, and everything works fine until you try to view a stream from a camera. When you try you get this error in Firefox:
Firefox can’t establish a connection to the server at wss://nvr.example.com:7446

and this error in Chrome:
WebSocket connection to 'wss://nvr.example.com:7446/.... failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

So apparently there is a websocket that tries to go through a different port and fails. How can I enable this in my dynamic config? Is it even possible?

did you ever figure this out? Im in the same situation.