make UA match case-insensitive

This commit is contained in:
Tove 2025-12-22 22:41:44 +01:00
parent 8c7dd287f1
commit 040a16b929
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -57,7 +57,10 @@ impl ClientID {
match self { match self {
Self::TransformedUA(s) => { Self::TransformedUA(s) => {
!(CONFIG["by_ua.enable"].boolean() !(CONFIG["by_ua.enable"].boolean()
&& (only_if.is_empty() || only_if.iter().any(|x| s.contains(x.str())))) && (only_if.is_empty()
|| only_if
.iter()
.any(|x| s.to_lowercase().contains(&x.str().to_lowercase()))))
} }
Self::IpAddr(_) => false, Self::IpAddr(_) => false,
} }