fix(integrations): fix Nextcloud-OnlyOffice callback URL and trusted_domains

StorageUrl was missing trailing slash — NC's OO connector does string
replacement of server URL (ending with /) with StorageUrl, so without
trailing slash "apps/" merges into hostname producing "nextcloudapps".

Also add "nextcloud" to NC trusted_domains so OO Document Server's
internal callbacks (Host: nextcloud) are not rejected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 21:19:39 +01:00
parent 5e1c073d3d
commit d7e5332a11
2 changed files with 15 additions and 2 deletions
+6
View File
@@ -1,5 +1,11 @@
## Changelog
### v0.31.5 — Fix Nextcloud-OnlyOffice callback URL + trusted_domains (2026-02-25)
#### Fixed
- **StorageUrl trailing slash**: `http://nextcloud``http://nextcloud/` — without trailing slash, Nextcloud's OO connector concatenates the hostname with `/apps/...` path, producing `http://nextcloudapps/...` (unresolvable hostname)
- **trusted_domains**: OO Document Server callbacks arrive with `Host: nextcloud` header; added `nextcloud` to Nextcloud's trusted_domains so these internal callbacks are not rejected
### v0.31.4 — Fix FB container not restarting + OO mixed content (2026-02-25)
#### Fixed
@@ -50,8 +50,15 @@ func (h *OnlyOfficeNextcloudHandler) Apply(ac *ApplyContext) error {
args: []string{"docker", "exec", "-u", "www-data", "nextcloud", "php", "occ", "config:app:set", "onlyoffice", "jwt_secret", "--value=" + jwtSecret},
},
{
// StorageUrl: tells OO Document Server where to reach Nextcloud internally for file callbacks
args: []string{"docker", "exec", "-u", "www-data", "nextcloud", "php", "occ", "config:app:set", "onlyoffice", "StorageUrl", "--value=http://nextcloud"},
// StorageUrl: tells OO Document Server where to reach Nextcloud internally for file callbacks.
// Trailing slash is critical — NC's OO connector does string replacement of the server URL
// (which ends with /) with StorageUrl. Without trailing slash, "/apps/..." merges into hostname.
args: []string{"docker", "exec", "-u", "www-data", "nextcloud", "php", "occ", "config:app:set", "onlyoffice", "StorageUrl", "--value=http://nextcloud/"},
},
{
// Add internal hostname to trusted_domains so OO Document Server callbacks
// (arriving with Host: nextcloud) are not rejected by Nextcloud.
args: []string{"docker", "exec", "-u", "www-data", "nextcloud", "php", "occ", "config:system:set", "trusted_domains", "10", "--value=nextcloud"},
},
}