CUSTESC-33731: Make rule match test report rule in 0-index base

This changes guarantees that the coommand to report rule matches when
testing local config reports the rule number using the 0-based indexing.
This is to be consistent with the 0-based indexing on the log lines when
proxying requests.
This commit is contained in:
João Oliveirinha
2023-10-03 11:25:59 +01:00
parent 541c63d737
commit adb7d40084
2 changed files with 7 additions and 7 deletions

View File

@@ -139,7 +139,7 @@ func testURLCommand(c *cli.Context) error {
}
_, i := ing.FindMatchingRule(requestURL.Hostname(), requestURL.Path)
fmt.Printf("Matched rule #%d\n", i+1)
fmt.Printf("Matched rule #%d\n", i)
fmt.Println(ing.Rules[i].MultiLineString())
return nil
}