mirror of
https://github.com/SunBK201/UA3F.git
synced 2025-12-18 09:46:58 +00:00
feat: update User-Agent regex pattern to ignore case sensitivity
This commit is contained in:
parent
e50f478ccf
commit
1df2c88e4f
@ -66,6 +66,9 @@ func main() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
logrus.Info(fmt.Sprintf("Listen on %s:%d", addr, port))
|
logrus.Info(fmt.Sprintf("Listen on %s:%d", addr, port))
|
||||||
|
|
||||||
|
// ignore case
|
||||||
|
uaPattern = "(?i)" + uaPattern
|
||||||
uaRegexp, err = regexp2.Compile(uaPattern, regexp2.None)
|
uaRegexp, err = regexp2.Compile(uaPattern, regexp2.None)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Fatal("Invalid User-Agent Regex Pattern: ", err)
|
logrus.Fatal("Invalid User-Agent Regex Pattern: ", err)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user