mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-10 18:48:44 +00:00
fix: reorder fields in AnubisRule struct for better alignment
This commit is contained in:
@@ -36,12 +36,13 @@ type RobotsRule struct {
|
||||
IsBlacklist bool // true if this is a specifically denied user agent
|
||||
}
|
||||
|
||||
//betteralign:ignore, we want name to be the first field
|
||||
type AnubisRule struct {
|
||||
Name string `yaml:"name" json:"name"`
|
||||
Action string `yaml:"action" json:"action"`
|
||||
Expression map[string]interface{} `yaml:"expression,omitempty" json:"expression,omitempty"`
|
||||
Challenge *config.ChallengeRules `yaml:"challenge,omitempty" json:"challenge,omitempty"`
|
||||
Weight *config.Weight `yaml:"weight,omitempty" json:"weight,omitempty"`
|
||||
Name string `yaml:"name" json:"name"`
|
||||
Action string `yaml:"action" json:"action"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
2
cmd/robots2policy/testdata/simple.yaml
vendored
2
cmd/robots2policy/testdata/simple.yaml
vendored
@@ -5,4 +5,4 @@
|
||||
- name: robots-txt-policy-disallow-2
|
||||
action: CHALLENGE
|
||||
expression:
|
||||
single: path.startsWith("/private")
|
||||
single: path.startsWith("/private")
|
||||
|
||||
Reference in New Issue
Block a user