mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-11 22:30:47 +01:00
rules: remove the requirement of "path must start with /"
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user