feat: update User-Agent regex pattern to ignore case sensitivity

This commit is contained in:
SunBK201 2024-11-20 14:16:49 +08:00
parent bdd1ee29b1
commit fe50d96102

View File

@ -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)