Fix WebDAV 504 by using internal Nextcloud URL

This commit is contained in:
Leon Bösche
2026-01-25 16:23:18 +01:00
parent 9bc03f6db8
commit 26fa1712ec

View File

@@ -62,8 +62,8 @@ func GenerateSecurePassword(length int) (string, error) {
// NewUserWebDAVClient creates a WebDAV client for a specific user
func NewUserWebDAVClient(nextcloudBaseURL, username, password string) *WebDAVClient {
// Remove any path from base URL, we need just the scheme://host:port
baseURL := strings.Split(nextcloudBaseURL, "/remote.php")[0]
// Use internal Nextcloud URL to bypass Traefik timeouts
baseURL := "http://nextcloud"
// Build the full WebDAV URL for this user
fullURL := fmt.Sprintf("%s/remote.php/dav/files/%s", baseURL, username)