From 1df2c88e4fea755968a650f9299f3dbe848e7bfa Mon Sep 17 00:00:00 2001 From: SunBK201 Date: Wed, 20 Nov 2024 14:16:49 +0800 Subject: [PATCH] feat: update User-Agent regex pattern to ignore case sensitivity --- src/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.go b/src/main.go index 36fa7c9..b3831bb 100644 --- a/src/main.go +++ b/src/main.go @@ -66,6 +66,9 @@ func main() { return } logrus.Info(fmt.Sprintf("Listen on %s:%d", addr, port)) + + // ignore case + uaPattern = "(?i)" + uaPattern uaRegexp, err = regexp2.Compile(uaPattern, regexp2.None) if err != nil { logrus.Fatal("Invalid User-Agent Regex Pattern: ", err)