Skip to content

Commit 074bb42

Browse files
committed
Stop using regex
1 parent 168bdb7 commit 074bb42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ExtractorFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function createExtractor(UriInterface $uri, RequestInterface $request, Re
5353
}
5454

5555
// Check if $host is a subdomain of $adapterHost.
56-
if (preg_match('/^([a-z0-9-]+)\.' . preg_quote($adapterHost, '/') . '$/i', $host, $matches)) {
56+
if (substr($host, -strlen($adapterHost) + 1) === ".{$adapterHost}") {
5757
$class = $adapter;
5858
break;
5959
}

0 commit comments

Comments
 (0)