ソースを参照

Mark empty User-Agent strings as bots

master
Matt Baer 6年前
コミット
5c3827dc76
1個のファイルの変更3行の追加0行の削除
  1. +3
    -0
      bots/bots.go

+ 3
- 0
bots/bots.go ファイルの表示

@@ -225,6 +225,9 @@ var botPrefixes = []string{
// IsBot returns whether or not the provided User-Agent string is a known bot
// or crawler.
func IsBot(ua string) bool {
if ua == "" {
return true
}
if _, ok := bots[ua]; ok {
return true
}


読み込み中…
キャンセル
保存