src/Router.php
private function compareDomain(?string $routeDomain, string $requestDomain): bool
    {
        return $routeDomain == null || preg_match('@^'.$routeDomain.'$@', $requestDomain);
    }
private function compareDomain(?string $routeDomain, string $requestDomain): bool
    {
        return $routeDomain == null || preg_match('@^'.$routeDomain.'$@', $requestDomain);
    }
Check if given request domain matches given route domain

@param string|null $routeDomain
@param string $requestDomain
@return bool