Improved bot detection code.
This commit is contained in:
parent
b4b53d839a
commit
68f9b6fa93
1 changed files with 2 additions and 2 deletions
|
@ -185,11 +185,11 @@ public class HttpAccessLog
|
|||
{
|
||||
boolean result;
|
||||
|
||||
if (StringsUtils.containsAnyIgnoreCase(this.userAgent.toString(), "bot", "monitoring", "Apache-HttpClient", "crawler"))
|
||||
if (StringsUtils.containsAnyIgnoreCase(this.userAgent.toString(), "bot", "monitoring", "crawler"))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
else if (StringUtils.startsWithAny(this.userAgent.toString(), "git/", "github-camo", "http.rb/", "Go-http-client", "GoModuleMirror/", "HotJava/", "Java/", "JGit/"))
|
||||
else if (StringUtils.startsWithAny(this.userAgent.toString(), "Apache-HttpClient/", "git/", "github-camo", "http.rb/", "Go-http-client", "GoModuleMirror/", "HotJava/", "Java/", "JGit/"))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue