How jvb client address rewriting works when defining address for colibri-ws?

WebSocket connection to ‘wss://localhost:8443/colibri-ws/172.18.0.2/cf9208f3f63e6753/7ac843e0?pwd=hb2u051823dope6ifvoovh5fq’ failed

How jvb client address rewriting works when defining address for colibri-ws?
How to override the address itself, provided that PUBLIC_URL does not affect this request in any way?

Can you share the related block in your Nginx config?
It seems that the host part (localhost in your example) is not configured coirrectly

The localhost:8443 comes from this config: jitsi-videobridge/reference.conf at e83100a7149a374deed2ab429266ed6c0c5987f5 · jitsi/jitsi-videobridge · GitHub
And 172.18.0.2 comes from this: jitsi-videobridge/reference.conf at e83100a7149a374deed2ab429266ed6c0c5987f5 · jitsi/jitsi-videobridge · GitHub

websockets {
enabled = true
domain = “stage-jitsi.example.com:443
tls = true
server-id = “jvb1”
}

In logs
INFO: Registering servlet at /colibri-ws/*, baseUrl = wss://stage-jitsi.example.com:443/colibri-ws/jvb1