优化URL匹配方法

This commit is contained in:
GoEdgeLab
2023-03-07 17:21:38 +08:00
parent 9a779bbc5f
commit 0145758e70
2 changed files with 7 additions and 1 deletions

View File

@@ -43,6 +43,12 @@ func TestURLPattern_Match(t *testing.T) {
url: "https://example.com",
result: true,
},
{
patternType: "wildcard",
pattern: "*COM",
url: "https://example.com/hello",
result: false,
},
{
patternType: "wildcard",
pattern: "http://*",