Nextcloud Docker - overwritecondaddr not working!

Hello my Friends,
I have some trouble to get a Nextcloud Docker instance working.
The Problem is, that I need to rewrite the Host Address.
Therefore I dicovered the overwritehost parameter which I configured in the config.php. This is working well, but I need to limit the overwritehost parameter to a specific IP-Address. Therefore I discovered the overwritecondaddr parameter.
But this Parameter is not working at all. When I configure the overwritecondaddr, The Address is still getting overwritten everytime. I already checked and tried every kind of spelling.

It’s exactly the same issue like this one here, explained at GitHub, but I didn’t understood the workaround!

Does anyone know how to solve this Problem?

If I get you right you want to overwrite the hostname only in case the request comes from specific IP e.g. your router? At least this is a problem described at GH. The solution there was to slightly to change the code of lib/private/AppFramework/Http/Request.php

But maybe you are heading the wrong way? usually if you publish your Nextcloud externally it runs behind reverse proxy with TLS certificate - accessing the instance from local LAN using local hostname or IP will result in TLS warnings (additionally sharing is broken as you can’t share internal address to external users). In this case best solution would be to always access application using external FQDN inside and outside your network (there are solutions to avoid going through internet - search split-bran DNS, split-horizon DNS, rebind protection). Additional benefit of such config is you always hit exactly the same access path - troubleshooting becomes much easier.

Thanks wwe, your helped me a lot. I will have a look how to make these changes to my docker enviroment.

You are absolutly right, in most cases this would be the wrong way, but in my case I think I’ve no choice.
I want to use a proxy-serverconnection. The Endpoint in America has a different Domainname than the Endpoint in Germany. Thats the Background. I already tried to configure my reverseproxy to handle this, but this wasn’t working, so for now I’m heading to the Nextcloudconfiguration