feat(botfilter): add hasHeader

This commit is contained in:
hoelee committed 2026-01-15 16:30:00 +08:00
1 parent 116ffa5615
commit 1a5f1062df
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)) != ""
}