rules: remove the requirement of "path must start with /"

This commit is contained in:
yusing 2025-01-29 08:57:42 +08:00
parent bbc10cb105
commit 60f83bb7bf
2 changed files with 1 additions and 4 deletions

View file

@ -145,7 +145,7 @@ var checkers = map[string]struct {
/path/to
/path/to/*`,
args: map[string]string{
"path": "the request path, must start with /",
"path": "the request path",
},
},
validate: validateURLPath,

View file

@ -96,9 +96,6 @@ func validateURLPath(args []string) (any, E.Error) {
if trailingSlash {
p += "/"
}
if p[0] != '/' {
return nil, ErrInvalidArguments.Withf("must start with /")
}
return p, nil
}