Use simpler regex format for wildcards

Use `\.?domain\.com$` instead of `((^)|(\.))domain\.com$`

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12
2018-07-31 21:35:27 -04:00
parent 16ee8908ba
commit b7ad22c51e

View File

@@ -37,7 +37,7 @@ switch($type) {
// Escape "." so it won't be interpreted as the wildcard character
$domain = str_replace(".","\.",$_POST['domain']);
// Add regex filter for legacy wildcard behavior
add_regex("((^)|(\.))".$domain."$");
add_regex("\.?".$domain."$");
break;
case "regex":
add_regex($_POST['domain']);