also support regexp in domain_suffix

This commit is contained in:
Oliver Gorwits
2019-09-03 13:35:26 +01:00
parent 0a2b5c8fa2
commit 975e4c6afc
2 changed files with 4 additions and 3 deletions

View File

@@ -151,11 +151,11 @@ sub search_by_dns {
if ref {} ne ref $cond or !exists $cond->{dns};
(my $suffix = (delete $cond->{suffix} || ''))
=~ s|^\Q(?^\E|***:(?|;
=~ s|\Q(?^\Eu?|(?|g;
$cond->{dns} = [ -and =>
{ '-ilike' => delete $cond->{dns} },
{ '~*' => "$suffix" },
{ '~*' => "***:$suffix" },
];
return $rs