Nextcloud with Collabora Online behind reverse proxy


I have set up a UCS 5 with Nextcloud and activated Collabora Online with internal CODE server. Now I am trying to access it via a reverse proxy. I have added the domain of my proxy to the trusted_domains in nextcloud and nextcloud itself seems to be working fine.

Except collabora online won’t open documents and when I enter the settings menu as nextcloud admin it tells me that it cannot access CODE server

When I open the nextcloud website from within the LAN via internal IP or internal FQDN everything is working fine.

I suspect the certificate of the UCS proxy as it does not contain the name of my external domain.
I already tried to type the URL manually, use as host and check the “ignore certificate” checkbox and for a moment it turns green, but it won’t safe the setting.

Any Ideas how to solve this?