From 7f6bbdc82c67fd3e00d9893bcedb6a03490d3c28 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Thu, 16 Apr 2026 15:39:48 -0700 Subject: [PATCH] Add robots.txt to forge.eblu.me blocking crawlers from /mirrors/ Facebook has been scraping forge mirror repos at ~3-4 req/s, slowing down the Forgejo instance. Serve robots.txt directly from nginx to disallow /mirrors/ while leaving eblume/* accessible to crawlers. Co-Authored-By: Claude Opus 4.6 (1M context) --- fly/nginx.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fly/nginx.conf b/fly/nginx.conf index 75cd102..995042e 100644 --- a/fly/nginx.conf +++ b/fly/nginx.conf @@ -155,6 +155,12 @@ http { internal; } + # Serve robots.txt directly — block crawlers from mirror repos + location = /robots.txt { + default_type text/plain; + return 200 "User-agent: *\nDisallow: /mirrors/\n"; + } + # Block swagger API docs — use forge.ops.eblu.me from tailnet location /swagger { return 403 "API documentation is only available at forge.ops.eblu.me (tailnet).\n";