mirror of
https://github.com/caddyserver/caddy.git
synced 2025-10-19 15:53:17 +00:00
caddyhttp: Fix host matching when host has a port
This commit is contained in:
parent
15647bdfb7
commit
6d0350d04e
2 changed files with 25 additions and 13 deletions
|
@ -87,6 +87,11 @@ func TestHostMatcher(t *testing.T) {
|
|||
input: "sub.foo.example.net",
|
||||
expect: false,
|
||||
},
|
||||
{
|
||||
match: MatchHost{"example.com"},
|
||||
input: "example.com:5555",
|
||||
expect: true,
|
||||
},
|
||||
} {
|
||||
req := &http.Request{Host: tc.input}
|
||||
actual := tc.match.Match(req)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue