feat(botfilter): matcher.go part 3/5
This commit is contained in:
1 parent
256f672ed6
commit
8f77d87a54
1 file changed
+7
@@ -103,3 +103,10 @@ func implausibleBrowser(r *http.Request, userAgent string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Do not require optional browser client-hint or fetch-metadata headers:
|
||||
// older browsers and privacy tools legitimately omit them. Instead reject
|
||||
// internally inconsistent browser family declarations.
|
||||
isChromium := strings.Contains(ua, "chrome/") || strings.Contains(ua, "crios/") || strings.Contains(ua, "edg/") || strings.Contains(ua, "opr/")
|
||||
isFirefox := strings.Contains(ua, "firefox/")
|
||||
isSafari := strings.Contains(ua, "safari/") && !isChromium
|
||||
|
||||
Reference in new issue
Block a user