From 814594e006ff5685ceccebfb6e416ef299cd2f03 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Thu, 26 Sep 2024 21:41:35 -0300 Subject: [PATCH] block claude. --- block.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block.go b/block.go index de9d756..c8f4794 100644 --- a/block.go +++ b/block.go @@ -18,6 +18,7 @@ func agentBlock(next http.HandlerFunc) http.HandlerFunc { "Yandex", "meta-externalagent", "DotBot", + "ClaudeBot", } { if strings.Contains(ua, bua) { // log.Debug().Str("ua", ua).Msg("user-agent blocked") @@ -67,7 +68,7 @@ func ipBlock(next http.HandlerFunc) http.HandlerFunc { if ip != nil { for _, ipnet := range ranges { if ipnet.Contains(ip) { - log.Debug().Stringer("ip", ip).Msg("cloudflare (attacker) ip blocked") + log.Debug().Stringer("ip", ip).Msg("ip blocked") http.Error(w, "Forbidden", http.StatusForbidden) return }