From 2d6fd9178ea983719f676316a85611381511ba2a Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Sun, 16 Apr 2023 00:25:59 +0200 Subject: [PATCH] mediaserver: add sonarr --- system/nixos/sonarr.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/system/nixos/sonarr.nix b/system/nixos/sonarr.nix index 55e98fc..00f1dbf 100644 --- a/system/nixos/sonarr.nix +++ b/system/nixos/sonarr.nix @@ -46,8 +46,18 @@ ''; locations."/" = { - recommendedProxySettings = true; proxyPass = "http://unix:/run/socat-sonarr/sonarr.sock:/"; + + extraConfig = '' + set $fake_host localhost; + + proxy_set_header Host $fake_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 X-Forwarded-Host $fake_host; + proxy_set_header X-Forwarded-Server $fake_host; + ''; }; }; }