+ try {
+ return self::isUriBlocked(new Uri($url));
+ } catch (\Throwable $e) {
+ Logger::warning('Invalid URL', ['url' => $url]);
+ return false;
+ }
+ }
+
+ /**
+ * Checks if the provided URI domain is on the domain blocklist.
+ *
+ * @param UriInterface $uri
+ * @return boolean
+ */
+ public static function isUriBlocked(UriInterface $uri): bool
+ {
+ if (!$uri->getHost()) {