public_wopi_url is automatically detected incorrectly and cannot be set manually.
Describe the bug Url is automatically detected incorrectly and cannot be set manually.
To Reproduce
# Check boths URLs
php occ config:app:get richdocuments wopi_url
php occ config:app:get richdocuments public_wopi_url
# Set Url
php occ config:app:set richdocuments public_wopi_url --value=https:\/\/cloud-test.borntoberoot.net\/custom_apps\/richdocumentscode\/proxy.php?req=
# Check URL again (it's correct)
php occ config:app:get richdocuments public_wopi_url
# Activate config
php occ richdocuments:activate-config
# Check again (it's not correct, again)
php occ config:app:get richdocuments public_wopi_url

Expected behavior URL is set correct after this.
Screenshots
URL is wrong

Server details
Latest docker-image: nextcloud:23-apache Latest collabora app via AppStore: richdocuments, richdocumentscode (x86/x64)
If i don't activate the conifg, the url is still wrong but i get another error in chrome:

@juliushaertl Any idea how to change the url or detect the proxy correct?
I setup the collabora code server via docker and had to set the variable server_name to my external domain of collabora:
# Collabora office
office:
image: collabora/code:latest
container_name: nextcloud_${ID}_office
restart: unless-stopped
networks:
- traefik_proxy
environment:
- domain=cloud.example.com
- username=admin
- password=123456
- server_name=office.example.com
- "extra_params=--o:ssl.enable=false --o:ssl.termination=true"
labels:
- "traefik.enable=true"
- "traefik.http.routers.nextcloud_${ID}_office.rule=Host(`office.internal.example.com`)"
- "traefik.http.routers.nextcloud_${ID}_office.entrypoints=websecure"
- "traefik.http.routers.nextcloud_${ID}_office.tls.certresolver=dns"
- "traefik.http.routers.nextcloud_${ID}_office.tls=true"
- "traefik.http.services.nextcloud_${ID}_office.loadbalancer.server.port=9980"
- "traefik.docker.network=traefik_proxy"
Before setting server_name the public_wopi_url was automaticaly set to office.internal.example.com. Since this domain is not reachable from the internet, the documents failed to load.
Would be great if we can set/override the server_name for the build in code server.
My problem is solved for my instances. Feel free to close this issue if it is no longer relevant for you (e.g. setting the server name for the build in server).
I think setting it manually might still be useful in some setups, so let's keep this as an enhancement request.