From 047c4b2207bf3e5ee45d88ba89d67c00431e72e5 Mon Sep 17 00:00:00 2001 From: Philip Peterson <1326208+philip-peterson@users.noreply.github.com> Date: Fri, 5 Jun 2026 23:20:27 -0700 Subject: [PATCH] Fix paperless nginx: remove duplicate proxy_set_header directives recommendedProxySettings already injects Host, X-Real-IP, X-Forwarded-* via an include in the location block. Our explicit extraConfig set them again, causing Django to receive 'host,host' and reject with DisallowedHost. Co-Authored-By: Claude Sonnet 4.6 --- nixos/nginx.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nixos/nginx.nix b/nixos/nginx.nix index 8fc7c9f..15168f4 100644 --- a/nixos/nginx.nix +++ b/nixos/nginx.nix @@ -121,10 +121,6 @@ locations."/" = { proxyPass = "http://127.0.0.1:8000/"; extraConfig = '' - 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; client_max_body_size 100M; ''; };