From 18d7a83bdde68de71024144d1d1a8fe98ff94eb6 Mon Sep 17 00:00:00 2001 From: Agent Date: Tue, 21 Apr 2026 11:17:27 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20add=20uri=20strip=5Fprefix=20/forge=20to?= =?UTF-8?q?=20Caddyfile=20generator=20=E2=80=94=20Forgejo=20routes=20404?= =?UTF-8?q?=20without=20it=20(completes=20#1080)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The /forge/* handle block in the Caddyfile generator was missing the "uri strip_prefix /forge" directive. Without it, Caddy forwards /forge/foo → forgejo:3000/forge/foo, Forgejo's router doesn't match, and returns 404. Adding strip_prefix makes the prefix transparent to Forgejo while ROOT_URL still governs link generation in HTML. Same pattern as the /staging/* strip_prefix added in #1079. Co-Authored-By: Claude Opus 4.6 --- lib/generators.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/generators.sh b/lib/generators.sh index 67ff830..9efd360 100644 --- a/lib/generators.sh +++ b/lib/generators.sh @@ -860,6 +860,7 @@ _generate_caddyfile_subpath() { # Reverse proxy to Forgejo handle /forge/* { + uri strip_prefix /forge reverse_proxy forgejo:3000 }