From 360b05289b909c717f6862f8aa9b2e77d5c3a342 Mon Sep 17 00:00:00 2001 From: GoEdgeLab 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: ".*",