fix(cmd/anubis): print "Rule error IDs" in JSON (#408)

* fix(cmd/anubis): print "Rule error IDs" in JSON

amend: add new gpg key

* chore: changelog
This commit is contained in:
Henri Vasserman 2025-05-02 21:05:41 +03:00 committed by GitHub
parent 6e82373718
commit f879e0d307
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -207,16 +207,15 @@ func main() {
log.Fatalf("can't parse policy file: %v", err)
}
fmt.Println("Rule error IDs:")
ruleErrorIDs := make(map[string]string)
for _, rule := range policy.Bots {
if rule.Action != config.RuleDeny {
continue
}
hash := rule.Hash()
fmt.Printf("* %s: %s\n", rule.Name, hash)
ruleErrorIDs[rule.Name] = hash
}
fmt.Println()
// replace the bot policy rules with a single rule that always benchmarks
if *debugBenchmarkJS {
@ -325,6 +324,7 @@ func main() {
"og-expiry-time", *ogTimeToLive,
"base-prefix", *basePrefix,
"cookie-expiration-time", *cookieExpiration,
"rule-error-ids", ruleErrorIDs,
)
go func() {