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; '';