mirror of
https://github.com/caddyserver/caddy.git
synced 2026-08-28 04:39:52 +00:00
Handle wildcard host matching in matchers.go
Signed-off-by: Rasheed Mudasiru <rasheedrtm1@gmail.com>
This commit is contained in:
parent
39c9a85f80
commit
3fa23cc05a
1 changed files with 3 additions and 0 deletions
|
|
@ -343,6 +343,9 @@ outer:
|
|||
|
||||
host = repl.ReplaceAll(host, "")
|
||||
if strings.Contains(host, "*") {
|
||||
if host == "*" {
|
||||
return true, nil
|
||||
}
|
||||
patternParts := strings.Split(host, ".")
|
||||
incomingParts := strings.Split(reqHost, ".")
|
||||
if len(patternParts) != len(incomingParts) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue