From 9d4eb5d048c9b29690ab2d10b307c2ec77e3bad8 Mon Sep 17 00:00:00 2001 From: Philip Peterson <1326208+philip-peterson@users.noreply.github.com> Date: Sun, 22 Dec 2024 06:56:25 -0500 Subject: [PATCH] wip --- nixos/nginx.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/nixos/nginx.nix b/nixos/nginx.nix index 507aa78..8f6cad1 100644 --- a/nixos/nginx.nix +++ b/nixos/nginx.nix @@ -119,25 +119,24 @@ locations."/" = { proxyPass = "http://127.0.0.1:8082/"; # pass through to webdav extraConfig = '' - # WebDAV-specific settings + # Pass required headers for WebDAV proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; + + # Pass Authorization header if required proxy_set_header Authorization $http_authorization; - - # Timeout for large file uploads/downloads + + # Set timeouts for large file uploads or long WebDAV operations proxy_read_timeout 300; proxy_connect_timeout 300; proxy_send_timeout 300; - - # Allow WebDAV methods - proxy_methods GET POST PUT DELETE OPTIONS PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK; - - # Client upload size + + # Increase client body size for large uploads client_max_body_size 100M; - - # Optional: Disable caching if issues arise + + # Optional: Disable caching for WebDAV operations proxy_buffering off; proxy_cache off; '';