Web and application redirects to local IP

Every time I leave nexcloud on the web platform, it redirects to the local IP of the application on this path:

When I use the desktop application I can not access because it directs the login to local IP.

I have already made the change in the following path including my public domain: vim /var/snap/nextcloud/current/nextcloud/config/config.php

‘trusted_domains’ =>
array (
0 => ‘’,
1 => ‘mydomain.com’,
‘datadirectory’ => ‘/ var / snap / nextcloud / common / nextcloud / data’
‘dbtype’ => ‘mysql’,
‘version’ => '15 .0.5.3 ',
‘overwrite.cli.url’ => ‘http://mydomain.com’,
‘dbname’ => ‘nextcloud’,

How do I forward to my public domain and not to the IP of my local network ???