diff --git a/cmd/anubis/main.go b/cmd/anubis/main.go index 1bef63e..da40a10 100644 --- a/cmd/anubis/main.go +++ b/cmd/anubis/main.go @@ -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() { diff --git a/docs/docs/CHANGELOG.md b/docs/docs/CHANGELOG.md index 0666c32..a7eb72c 100644 --- a/docs/docs/CHANGELOG.md +++ b/docs/docs/CHANGELOG.md @@ -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