Fix append to policy name, shouldn't be rule name

This commit is contained in:
Steven Polley 2020-05-29 20:44:53 -06:00
parent f2327b1c1d
commit 0304fc8fea
1 changed files with 2 additions and 2 deletions

View File

@ -51,10 +51,10 @@ func config(redirects []Redirect) error {
// Iterate over values in the policy map and output the policy configuration
fmt.Println("config waf url-rewrite url-rewrite-policy")
for policyName, policyRules := range redirectPolicies {
fmt.Printf("edit \"%s\"\n", policyName)
fmt.Printf("edit \"%s-redirects\"\n", policyName)
for _, ruleName := range policyRules {
fmt.Println("edit 0")
fmt.Printf("set url-rewrite-rule-name %s-redirects\n", ruleName)
fmt.Printf("set url-rewrite-rule-name %s\n", ruleName)
fmt.Println("next")
fmt.Println("end")
}