ingress: crawler hammering Gitea /projects with permuted label filters (~1 req/s sustained) #656
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Noticed while diagnosing the 2026-08-18 DNS outage: 216.73.216.253 requests
/homelab/stack/projects/1?labels=<permutation>roughly once per second, endlessly permuting label-ID combinations — a combinatorial crawler trap. Each response is ~43KB/10ms so load is minor, but it is sustained junk traffic filling traefik access logs (it was also the accidental reason git survived the DNS outage — its warm connection pool never re-resolved).Options: robots.txt disallow on /*/projects with filters; a traefik rate-limit or bot-block middleware on the git router (216.73.216.0/24 resolves to a known AI-crawler range); or Gitea-side setting to noindex filtered views.
Fixed in
3a225c6(live — traefik watches the dynamic dir). A dedicated router git-projects-filter (priority 1000) matches Host(git) && PathRegexp(^///projects) && QueryRegexp(labels, .+) on both entrypoints and applies a per-source-IP rateLimit (average 10/min, burst 20). Verified from the host: 30 rapid requests to /homelab/stack/projects/1?labels=… → 20×200 then 10×429; ordinary git traffic is untouched. A robots.txt disallowing filtered views (projects, ?labels=, ?state=, compare/commits/blame/raw, /api/) is served from Gitea's custom/public dir — note Cloudflare's managed robots.txt (AI-crawler content signals) is what the public sees at /robots.txt, so the rate limit is the effective control for a crawler that ignores robots anyway.