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() {

View File

@ -12,13 +12,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
- Fixed native packages not containing the stdlib and botPolicies.yaml
- Change import syntax to allow multi-level imports
- Changed the startup logging to use JSON formatting as all the other logs do.
## v1.17.1: Asahi sas Brutus: Echo 1
- Added customization of authorization cookie expiration time with `--cookie-expiration-time` flag or envvar
- Updated the `OG_PASSTHROUGH` to be true by default, thereby allowing OpenGraph tags to be passed through by default
- Added the ability to [customize Anubis' HTTP status codes](./admin/configuration/custom-status-codes.mdx) ([#355](https://github.com/TecharoHQ/anubis/issues/355))
- Change import syntax to allow multi-level imports
## v1.17.0: Asahi sas Brutus