mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-09-08 04:05:23 -04:00
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:
parent
6e82373718
commit
f879e0d307
@ -207,16 +207,15 @@ func main() {
|
|||||||
log.Fatalf("can't parse policy file: %v", err)
|
log.Fatalf("can't parse policy file: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("Rule error IDs:")
|
ruleErrorIDs := make(map[string]string)
|
||||||
for _, rule := range policy.Bots {
|
for _, rule := range policy.Bots {
|
||||||
if rule.Action != config.RuleDeny {
|
if rule.Action != config.RuleDeny {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
hash := rule.Hash()
|
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
|
// replace the bot policy rules with a single rule that always benchmarks
|
||||||
if *debugBenchmarkJS {
|
if *debugBenchmarkJS {
|
||||||
@ -325,6 +324,7 @@ func main() {
|
|||||||
"og-expiry-time", *ogTimeToLive,
|
"og-expiry-time", *ogTimeToLive,
|
||||||
"base-prefix", *basePrefix,
|
"base-prefix", *basePrefix,
|
||||||
"cookie-expiration-time", *cookieExpiration,
|
"cookie-expiration-time", *cookieExpiration,
|
||||||
|
"rule-error-ids", ruleErrorIDs,
|
||||||
)
|
)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
@ -12,13 +12,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
- Fixed native packages not containing the stdlib and botPolicies.yaml
|
- 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
|
## v1.17.1: Asahi sas Brutus: Echo 1
|
||||||
|
|
||||||
- Added customization of authorization cookie expiration time with `--cookie-expiration-time` flag or envvar
|
- 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
|
- 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))
|
- 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
|
## v1.17.0: Asahi sas Brutus
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user