Adds the support for IPv6 in the TCP HostSNI matcher
This commit is contained in:
parent
e053eb6f17
commit
1a6dfe1f6b
3 changed files with 28 additions and 4 deletions
|
@ -63,6 +63,20 @@ func Test_addRoute(t *testing.T) {
|
|||
"http://localhost/foo": http.StatusOK,
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "Host IPv4",
|
||||
rule: "Host(`127.0.0.1`)",
|
||||
expected: map[string]int{
|
||||
"http://127.0.0.1/foo": http.StatusOK,
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "Host IPv6",
|
||||
rule: "Host(`10::10`)",
|
||||
expected: map[string]int{
|
||||
"http://10::10/foo": http.StatusOK,
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "Non-ASCII Host",
|
||||
rule: "Host(`locàlhost`)",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue