After upgrade from 28 to 29 I have "Data directory and your files are probably accessible from the Internet"

Got the same error after upgrading to Hub29. I am using nextcloud docker with an nginx as reverse proxy (which is on a different host). I don’t have the trusted_proxy config setting at all. My config.php is set as follows:

  'trusted_domains' => 
  array (
    0 => 'my.domain.com',
  ),

  'overwrite.cli.url' => 'https://my.domain.com',
  'overwriteprotocol' => 'https',

If I remove trusted_domain, nextcloud doesn’t work. If I remove overwrite.cli.url and overwriteprotocol nextcloud still works but shows a lot of other errors. Really struggling how to fix this while also being worried that data is exposed.

Found this Frequent Nextcloud 29 (Hub 8) update issues - but it doesn’t really help.