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

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")
}