From 2d304b19b8eb4eefc4d9d9227e054f2b0678e8b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Tue, 9 Apr 2024 09:46:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B5=8B=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/serverconfigs/shared/url_pattern_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkg/serverconfigs/shared/url_pattern_test.go b/pkg/serverconfigs/shared/url_pattern_test.go index c1f419e..ce66a42 100644 --- a/pkg/serverconfigs/shared/url_pattern_test.go +++ b/pkg/serverconfigs/shared/url_pattern_test.go @@ -76,6 +76,18 @@ func TestURLPattern_Match(t *testing.T) { url: "/hidden/index.html", result: false, // because don't have https://HOST in url }, + { + patternType: "wildcard", + pattern: "*.jpg", + url: "https://example.com/index.jpg", + result: true, + }, + { + patternType: "wildcard", + pattern: "*.jpg", + url: "https://example.com/index.js", + result: false, + }, { patternType: "regexp", pattern: ".*",