{ "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)\"\n@disputed header_regexp User-Agent \"(?i)(Bytespider|TikTokSpider)\"\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" }