Fix Nextcloud DAV connections on Core: public-IP pin + username-composed prefills
Two bugs made the suggested Nextcloud shares fail on Core: 1. Reachability: nextcloud.$DOMAIN is split-horizon DNS — inside the core network it answers the Nextcloud container's private IP, where nothing listens on 443 (traefik holds TLS on the public address), and netguard refuses private dials anyway. Verified from the core network: the private route refuses connections; the public route answers PROPFIND with 401 (correct credentials-required). The installer's rendered compose now pins nextcloud.$DOMAIN to EXTERNALIP via extra_hosts on the APP service — the exact house pattern the web service already uses for authelia. DNS inside the app container resolves the public address, the dial goes through traefik like any external client, and netguard stays fully strict (no guard relaxation, no trusted-host change). update.sh re-renders compose from the shipped lib, so running cores pick this up on upgrade. 2. Wrong endpoint: Nextcloud's DAV roots are per-user (/remote.php/dav/files/<username>/, /calendars/<username>/), but the WebDAV and CalDAV suggestion prefills handed over the bare /files/ and /calendars/ homes — one level above any valid endpoint. Both now compose the viewer's username into the URL (the URL shown is the URL saved), matching the CardDAV prefill. Dry-rendered the updated compose template and validated it with docker compose config. Regressions updated to assert the composed per-user URLs are what gets POSTed (20/20 PASS incl. the mobile suite); real-stack e2e all PASS; lint/SSR-lint/build clean. API.md and the local AGENTS invariant document the pin and the composition.
This commit is contained in:
@@ -119,7 +119,10 @@ share every ~30 minutes under a global advisory lease; `WebDavConnection` +
|
||||
`WebDavItem` (migration 020) store credentials and the path↔bookmark ledger.
|
||||
On Core the deployment's `NEXTCLOUD_URL` makes the list carry a one-click
|
||||
suggestion (`https://<nextcloud>/remote.php/dav/files/`) — DATA, not a code
|
||||
fork on TIER.
|
||||
fork on TIER. The UI composes the viewer's username into the per-user DAV
|
||||
root (`/files/<username>/`), and the Core app container pins the Nextcloud
|
||||
hostname to the deployment's public IP (compose `extra_hosts`): the
|
||||
split-horizon private answer has no 443 listener and netguard stays strict.
|
||||
|
||||
| Method | Path | Returns / behavior |
|
||||
|---|---|---|
|
||||
|
||||
Reference in New Issue
Block a user