Skip to content

Commit 6c08487

Browse files
authored
Merge pull request #350 from tugrul/expose_domains
fix regex pattern
2 parents 552c00c + eb1b80a commit 6c08487

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Extractor/ExposedRoutesExtractor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function getRoutes()
8787
continue;
8888
}
8989

90-
preg_match('#' . $this->pattern . '#', $name, $matches);
90+
preg_match('#^' . $this->pattern . '$#', $name, $matches);
9191

9292
if (count($matches) === 0) {
9393
continue;
@@ -197,7 +197,7 @@ public function getResources()
197197
public function isRouteExposed(Route $route, $name)
198198
{
199199
return true === $route->hasOption('expose') ||
200-
('' !== $this->pattern && preg_match('#' . $this->pattern . '#', $name));
200+
('' !== $this->pattern && preg_match('#^' . $this->pattern . '$#', $name));
201201
}
202202

203203
protected function getDomainByRouteMatches($matches, $name)

0 commit comments

Comments
 (0)