mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-19 20:32:35 +02:00
rules: remove the requirement of "path must start with /"
This commit is contained in:
parent
bbc10cb105
commit
60f83bb7bf
2 changed files with 1 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue