Skip to content

Commit f7dc81f

Browse files
authored
Merge pull request #46 from borbmizzet/feature/allow-wildcard-hostname
Allow wildcard in valid hostname
2 parents c4ab924 + 5134501 commit f7dc81f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cloudflare.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ private function extractHostnames($hostnames)
399399
*/
400400
private function isValidHostname($value)
401401
{
402-
$domainPattern = "/^(?!-)(?:(?:[a-zA-Z\d][a-zA-Z\d\-]{0,61})?[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63}$/";
402+
$domainPattern = "/^(?!-)(?:\*\.)?(?:(?:[a-zA-Z\d][a-zA-Z\d\-]{0,61})?[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63}$/";
403403
return preg_match($domainPattern, $value);
404404
}
405405

0 commit comments

Comments
 (0)