diff --git a/setup.sh b/setup.sh index bd1f9a5..977257e 100755 --- a/setup.sh +++ b/setup.sh @@ -847,7 +847,7 @@ if [ "$FORGEJO" = "1" ]; then GIT_SITE=" ${GIT_DOMAIN} { encode zstd gzip - import accesslog + import accesslog_git reverse_proxy http://${FORGEJO_HTTP_ADDR} } " @@ -977,6 +977,21 @@ cat > /etc/caddy/Caddyfile </.env.example, package.json), which +# the web rules read as sensitive-file probes: within minutes of watching it, +# 63 crawler IPs were auto-banned from git (2026-11-30). Kept for forensics. +(accesslog_git) { + log { + output file /var/log/caddy/git-access.log { + roll_size 50MiB + roll_keep 5 + roll_keep_for 720h + } + format json + } +} + ${DOMAIN} { encode zstd gzip import accesslog