Skip to content

Commit

Permalink
BUGFIX: Improve regex
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellienert committed Mar 18, 2021
1 parent b93da28 commit 8f40cc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Service/SiteDeterminationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function getCurrentSiteName(): ?string
* Site as uri path segment
* Used to get dimension constraints in the backend
*/
preg_match('/content-dimensions\/(\S+)\/country\.json/', $httpRequest->getUri()->getPath(), $matches, PREG_OFFSET_CAPTURE);
preg_match('/content-dimensions\/([a-zA-Z\-\_\.]+)\/[a-zA-Z\-\_]+\.json/', $httpRequest->getUri()->getPath(), $matches, PREG_OFFSET_CAPTURE);
if (($matches[1] ?? null) !== null) {
self::$siteName = $matches[1][0];
return self::$siteName;
Expand Down

0 comments on commit 8f40cc3

Please sign in to comment.