Il sito funziona meglio con JavaScript.
Home
Esplora
Aiuto
Accedi
writeas
/
web-core
mirror da
https://github.com/writeas/web-core
Segui
1
Vota
0
Forka
0
Codice
Problemi
0
Rilasci
0
Attività
Sfoglia il codice sorgente
Mark empty User-Agent strings as bots
master
Matt Baer
6 anni fa
parent
e082f1e402
commit
5c3827dc76
1 ha cambiato i file
con
3 aggiunte
e
0 eliminazioni
Visualizzazione separata
Opzioni Diff
Mostra statistiche
Scarica il file Patch
Scarica il file Diff
+3
-0
bots/bots.go
+ 3
- 0
bots/bots.go
Vedi File
@@ -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
}
Scrivi
Anteprima
Caricamento…
Annulla
Salva