From a6fa5e4d60209039bbb76b8a92ce3b4af0aa0877 Mon Sep 17 00:00:00 2001 From: "Ricardo (XenGi) Band" Date: Tue, 20 Oct 2026 20:33:58 +0200 Subject: [PATCH] fix --- hosts/git/forgejo.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hosts/git/forgejo.nix b/hosts/git/forgejo.nix index a04410d..b1ebeda 100644 --- a/hosts/git/forgejo.nix +++ b/hosts/git/forgejo.nix @@ -105,11 +105,16 @@ in deny all; ''; }; - "~ ^/[^/]+/[^/]+/archive/".extraConfig = '' - limit_req zone=forgejo_archive burst=10 nodelay; - limit_conn forgejo_archive_conn 2; - limit_req_status 429; - ''; + "~ ^/[^/]+/[^/]+/archive/" = { + recommendedProxySettings = true; + proxyPass = "http://unix:${config.services.forgejo.settings.server.HTTP_ADDR}"; + extraConfig = '' + proxy_set_header Forwarded "$proxy_forwarded_for_element;$proxy_forwarded_by_element;host=$host;proto=$scheme"; + limit_req zone=forgejo_archive burst=10 nodelay; + limit_conn forgejo_archive_conn 2; + limit_req_status 429; + ''; + }; "= /robots.txt".extraConfig = '' default_type text/plain; return 200 "User-agent: *\nDisallow: /*/*/archive/\n";