From 1effdc13a2b7baeb79c0e4f3f43dc741a0d7e703 Mon Sep 17 00:00:00 2001 From: Philip Peterson <1326208+philip-peterson@users.noreply.github.com> Date: Sun, 22 Dec 2024 06:53:48 -0500 Subject: [PATCH] wip --- nixos/nginx.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/nixos/nginx.nix b/nixos/nginx.nix index 761a049..507aa78 100644 --- a/nixos/nginx.nix +++ b/nixos/nginx.nix @@ -118,6 +118,29 @@ locations."/" = { proxyPass = "http://127.0.0.1:8082/"; # pass through to webdav + extraConfig = '' + # WebDAV-specific settings + 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; + proxy_set_header Authorization $http_authorization; + + # Timeout for large file uploads/downloads + 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 + client_max_body_size 100M; + + # Optional: Disable caching if issues arise + proxy_buffering off; + proxy_cache off; + ''; }; };