feat(botfilter): add hasHeader

This commit is contained in:
hoelee committed 2026-01-28 16:30:00 +08:00
1 parent 9c47553d40
commit 94a9fe0eb2
1 file changed
+3
+3
View File
@@ -122,3 +122,6 @@ func pathMatches(path, rule string) bool {
return path == rule || strings.HasPrefix(path, rule+"/")
}
func hasHeader(r *http.Request, name string) bool {
return strings.TrimSpace(r.Header.Get(name)) != ""
}