Skip to content

Commit

Permalink
Merge pull request #350 from tugrul/expose_domains
Browse files Browse the repository at this point in the history
fix regex pattern
  • Loading branch information
tobias-93 committed Jun 8, 2019
2 parents 552c00c + eb1b80a commit 6c08487
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Extractor/ExposedRoutesExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function getRoutes()
continue;
}

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

if (count($matches) === 0) {
continue;
Expand Down Expand Up @@ -197,7 +197,7 @@ public function getResources()
public function isRouteExposed(Route $route, $name)
{
return true === $route->hasOption('expose') ||
('' !== $this->pattern && preg_match('#' . $this->pattern . '#', $name));
('' !== $this->pattern && preg_match('#^' . $this->pattern . '$#', $name));
}

protected function getDomainByRouteMatches($matches, $name)
Expand Down

0 comments on commit 6c08487

Please sign in to comment.