Extended user agent bot criteria detection.

This commit is contained in:
Christian P. MOMON 2021-06-06 12:27:04 +02:00
parent 3646bb4d74
commit f209406b3a

View file

@ -185,12 +185,13 @@ public class HttpAccessLog
{
boolean result;
if (StringsUtils.containsAnyIgnoreCase(this.userAgent.toString(), "BingPreview", "bot", "crawler", "HeadlessChrome/", "monitoring", "YisouSpider"))
if (StringsUtils.containsAnyIgnoreCase(this.userAgent.toString(), "BingPreview", "bot", "crawler", "HeadlessChrome/", " - Mobilizon ", "monitoring", "YisouSpider"))
{
result = true;
}
else if (StringUtils.startsWithAny(this.userAgent.toString(), "Apache-HttpClient/", "Friendica ", "curl/", "git/", "github-camo", "http.rb/", "FediList ", "Go-http-client", "GoModuleMirror/",
"HotJava/", "Java/", "JGit/", "mattermost-", "Misskey/", "newspaper/", "okhttp/", "PeerTube/", "PHP/", "Pleroma ", "python-requests/", "Synapse/", "Tusky/"))
else if (StringUtils.startsWithAny(this.userAgent.toString(), "Apache-HttpClient/", "curl/", "Friendica ", "git/", "github-camo", "hackney/", "http.rb/", "FediList ", "Go-http-client",
"GoModuleMirror/", "HotJava/", "Java/", "JGit/", "MastoPeek ", "mattermost-", "Misskey/", "newspaper/", "node-fetch/", "okhttp/", "PeerTube/", "PHP/", "Pleroma ", "python-requests/",
"python/", "Python/", "Synapse/", "Tusky/"))
{
result = true;
}