mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 06:14:22 +01:00
unblock bing and apple bots.
This commit is contained in:
2
block.go
2
block.go
@@ -20,10 +20,8 @@ func agentBlock(next http.HandlerFunc) http.HandlerFunc {
|
|||||||
"DotBot",
|
"DotBot",
|
||||||
"ClaudeBot",
|
"ClaudeBot",
|
||||||
"GPTBot",
|
"GPTBot",
|
||||||
"bingbot",
|
|
||||||
"MJ12Bot",
|
"MJ12Bot",
|
||||||
"PetalBot",
|
"PetalBot",
|
||||||
"Applebot",
|
|
||||||
} {
|
} {
|
||||||
if strings.Contains(ua, bua) {
|
if strings.Contains(ua, bua) {
|
||||||
// log.Debug().Str("ua", ua).Msg("user-agent blocked")
|
// log.Debug().Str("ua", ua).Msg("user-agent blocked")
|
||||||
|
|||||||
@@ -23,18 +23,12 @@ Disallow: /
|
|||||||
User-agent: dotbot
|
User-agent: dotbot
|
||||||
Disallow: /
|
Disallow: /
|
||||||
|
|
||||||
User-agent: bingbot
|
|
||||||
Disallow: /
|
|
||||||
|
|
||||||
User-agent: MJ12bot
|
User-agent: MJ12bot
|
||||||
Disallow: /
|
Disallow: /
|
||||||
|
|
||||||
User-agent: PetalBot
|
User-agent: PetalBot
|
||||||
Disallow: /
|
Disallow: /
|
||||||
|
|
||||||
User-agent: Applebot
|
|
||||||
Disallow: /
|
|
||||||
|
|
||||||
User-agent: *
|
User-agent: *
|
||||||
Allow: /
|
Allow: /
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user