mirror of
https://github.com/SunBK201/UA3F.git
synced 2025-12-16 16:57:08 +00:00
feat: update User-Agent regex pattern to ignore case sensitivity
This commit is contained in:
parent
bdd1ee29b1
commit
fe50d96102
@ -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