From a71777634c14d7d46f59d7af23821afac8f46718 Mon Sep 17 00:00:00 2001 From: kalipso Date: Tue, 15 Apr 2025 12:20:06 +0200 Subject: [PATCH] [zineshop] better proxy settings for large files --- machines/durruti/host_config.nix | 6 ++++++ machines/fanny/configuration.nix | 7 +++++++ machines/vpn/configuration.nix | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/machines/durruti/host_config.nix b/machines/durruti/host_config.nix index 7d4e6b7d..c9e4ff26 100644 --- a/machines/durruti/host_config.nix +++ b/machines/durruti/host_config.nix @@ -80,7 +80,13 @@ in locations."/" = { proxyPass = "http://10.0.0.10"; extraConfig = '' + client_body_in_file_only clean; + client_body_buffer_size 32K; + client_max_body_size 0; + + sendfile on; + send_timeout 300s; ''; }; }; diff --git a/machines/fanny/configuration.nix b/machines/fanny/configuration.nix index 8724e300..fa5fb7cf 100644 --- a/machines/fanny/configuration.nix +++ b/machines/fanny/configuration.nix @@ -160,7 +160,14 @@ in proxyPass = "http://10.0.0.15:8080"; extraConfig = '' proxy_set_header Host $host; + + client_body_in_file_only clean; + client_body_buffer_size 32K; + client_max_body_size 0; + + sendfile on; + send_timeout 300s; ''; }; }; diff --git a/machines/vpn/configuration.nix b/machines/vpn/configuration.nix index eb9eac50..eb70459c 100644 --- a/machines/vpn/configuration.nix +++ b/machines/vpn/configuration.nix @@ -77,7 +77,14 @@ with lib; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Authorization $http_authorization; # Pass the Authorization header proxy_pass_header Authorization; + + client_body_in_file_only clean; + client_body_buffer_size 32K; + client_max_body_size 0; + + sendfile on; + send_timeout 300s; ''; }; };