From 71e18ef931f19fa8d2c76042fc5656986c06db24 Mon Sep 17 00:00:00 2001 From: Bouke van der Bijl Date: Mon, 4 May 2026 12:31:45 +0200 Subject: [PATCH] nixos/nginx/tailscale-auth: drop Content-Length header When a request has no body but Content-Length does have a value, the request can hang waiting for the body. We should clear out the Content-Length header when forwarding the request without the body. --- nixos/modules/services/web-servers/nginx/tailscale-auth.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/web-servers/nginx/tailscale-auth.nix b/nixos/modules/services/web-servers/nginx/tailscale-auth.nix index 09ddc3fffc56..527654add0b5 100644 --- a/nixos/modules/services/web-servers/nginx/tailscale-auth.nix +++ b/nixos/modules/services/web-servers/nginx/tailscale-auth.nix @@ -73,6 +73,7 @@ in proxy_pass http://unix:${cfgAuth.socketPath}; proxy_pass_request_body off; + proxy_set_header Content-Length ""; # Upstream uses $http_host here, but we are using gixy to check nginx configurations # gixy wants us to use $host: https://github.com/yandex/gixy/blob/master/docs/en/plugins/hostspoofing.md