mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-26 21:53:48 +03:00
This commit is contained in:
parent
f4840cfeb8
commit
654a3bb090
1 changed files with 1 additions and 2 deletions
|
@ -456,8 +456,7 @@ func (m MatchPath) Match(r *http.Request) bool {
|
||||||
// treat it as a fast substring match
|
// treat it as a fast substring match
|
||||||
if strings.Count(matchPattern, "*") == 2 &&
|
if strings.Count(matchPattern, "*") == 2 &&
|
||||||
strings.HasPrefix(matchPattern, "*") &&
|
strings.HasPrefix(matchPattern, "*") &&
|
||||||
strings.HasSuffix(matchPattern, "*") &&
|
strings.HasSuffix(matchPattern, "*") {
|
||||||
strings.Count(matchPattern, "*") == 2 {
|
|
||||||
if strings.Contains(reqPathForPattern, matchPattern[1:len(matchPattern)-1]) {
|
if strings.Contains(reqPathForPattern, matchPattern[1:len(matchPattern)-1]) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue