From 6e083a3014ff9499889d1267fcab0fa761599f7d Mon Sep 17 00:00:00 2001 From: traveler Date: Mon, 27 Apr 2026 11:04:44 -0500 Subject: [PATCH] SA --- swarm/stack/caddy/Caddyfile | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/swarm/stack/caddy/Caddyfile b/swarm/stack/caddy/Caddyfile index 42a9926..30e91d8 100644 --- a/swarm/stack/caddy/Caddyfile +++ b/swarm/stack/caddy/Caddyfile @@ -51,32 +51,15 @@ # Nextcloud AIO - Optimized for WebDAV and Folder Uploads cloud.netgrimoire.com { - # Disable body limits for large uploads (Nextcloud AIO manages its own) - request_body { - max_size -1 - } - - # Use 'copy_response_headers' to ensure WebDAV 'Move/Copy' headers - # aren't stripped by Caddy's default normalization. + # No CrowdSec here for now to prevent 404s on rapid-fire WebDAV requests reverse_proxy http://nextcloud-aio-apache:11000 { - # CRITICAL: Prevents Caddy from normalizing slashes/spaces in paths, - # which is the primary cause of 'Folder Not Found' errors in SabreDAV. - rewrite_upstream_request_header - header_up Host {host} header_up X-Real-IP {remote_host} header_up X-Forwarded-For {remote_host} + header_up X-Forwarded-Proto {scheme} - # Hardcode to https so Nextcloud's internal logic - # doesn't break during the 302/redirect phase of a folder creation. - header_up X-Forwarded-Proto https - - # Essential for WebDAV 'MOVE' and 'COPY' commands used in folder uploads - header_up Destination {http.request.header.Destination} - transport http { - # Increased for large file assembly (merging chunks) - response_header_timeout 600s + response_header_timeout 300s dial_timeout 30s } }