{
 "slug": "caddy",
 "title": "Caddy: block by user-agent",
 "language": "caddy",
 "suggested_filename": "Caddyfile",
 "description": "A Caddy matcher plus respond directive. Caddy's header_regexp matcher is case-sensitive, so the pattern is written with an inline (?i) flag.",
 "url": "https://www.pathwren.workers.dev/snippet/caddy.txt",
 "body": "# AI Crawler Index — Caddy\n# curl -s https://www.pathwren.workers.dev/snippet/caddy.txt\n@ai_training header_regexp User-Agent \"(?i)(GPTBot|ClaudeBot|anthropic\\-ai|GoogleOther|Bytespider|TikTokSpider|meta\\-externalagent|FacebookBot|cohere\\-training\\-data\\-crawler|Webzio\\-Extended|SemrushBot\\-OCOB|GoogleOther\\-Image|GoogleOther\\-Video|YandexAdditional|YandexAdditionalBot|SBIntuitionsBot|ICC\\-Crawler|Cotoyogi|ISSCyberRiskCrawler|Sidetrade\\ indexer\\ bot|QuillBot|Factset_spyderbot|Poseidon\\ Research\\ Crawler|Reflectionbot|Linguee\\ Bot)\"\n@disputed    header_regexp User-Agent \"(?i)(Bytespider|TikTokSpider|ISSCyberRiskCrawler|Thinkbot|Linguee\\ Bot)\"\n\nhandle @disputed {\n\trespond \"403 - see /robots.txt\" 403\n}\nhandle @ai_training {\n\theader X-Crawler-Class \"ai-training\"\n\t# file_server / reverse_proxy as usual\n}\n"
}