Make Pi.hole not only listening to it's own name

The index.php in /var/www/html/pihole contains the line in which it will only react if the domainname is exactly ‘pi.hole’.

Now am I using a test Pi-hole as second pi.hole and use the domain name pi2.hole and I have to change that each time if the index.php is updated.

How can I change that it will react to any domain as long the tld is ‘.hole’ ?

Found it myself and I have to replace line 53 in index.php.

Original: if ($serverName === "pi.hole") {
Changed: if (preg_match("/\.hole$/", $serverName)) {