3 ms·
For reference, this is how I do it in my Caddyfile: (block_ai) { @ai_bots { header_regexp User-Agent (?i)(anthropic-ai|ClaudeBot|Claude-We
by Phelinofist 9mo ago
For reference, this is how I do it in my Caddyfile:
(block_ai) {
@ai_bots {
header_regexp User-Agent (?i)(anthropic-ai|ClaudeBot|Claude-Web|Claude-SearchBot|GPTBot|ChatGPT-User|Google-Extended|CCBot|PerplexityBot|ImagesiftBot)
}
abort @ai_bots
}
Then, in a specific app block include it via
import block_ai
- zaphar 9mo agoI have almost exactly this in my own caddyfile :-D The order of the items in the regex is a little different but mostly the same items. I just pulled them from my web access logs over time and update it every once in a while.
- seba_dos1 9mo agoMost of then pretend to be real users though and don't identify themselves with their user agent strings.