rename regex field to request, increase db field size to 1024 bytes

This commit is contained in:
yggverse 2025-07-24 07:03:33 +03:00
parent 4c305f967f
commit 1302a89c44
4 changed files with 8 additions and 8 deletions

View file

@ -48,7 +48,7 @@ impl Proxy {
for r in rules {
b.push(Rule {
is_enabled: r.is_enabled,
regex: r.regex,
request: r.request,
url: r.url,
});
}
@ -62,7 +62,7 @@ impl Proxy {
pub fn matches(&self, request: &Uri) -> Option<ProxyResolver> {
for rule in self.rule.borrow().iter().filter(|r| r.is_enabled) {
if gtk::glib::Regex::match_simple(
&rule.regex,
&rule.request,
request.to_str(),
gtk::glib::RegexCompileFlags::DEFAULT,
gtk::glib::RegexMatchFlags::DEFAULT,