wasm: strip port from host when match host (#626)

This commit is contained in:
澄潭
2023-11-07 17:11:56 +08:00
committed by GitHub
parent 26654aefc0
commit 9f5b795a4d
4 changed files with 75 additions and 1 deletions

View File

@@ -118,6 +118,19 @@ func TestHostMatch(t *testing.T) {
host: "example.com",
result: false,
},
{
name: "exact port",
config: RuleConfig[customConfig]{
hosts: []HostMatcher{
{
matchType: Exact,
host: "www.example.com",
},
},
},
host: "www.example.com:8080",
result: true,
},
{
name: "any",
config: RuleConfig[customConfig]{