Skip to content

Commit

Permalink
BUGFIX: Use uriPathSuffix from options
Browse files Browse the repository at this point in the history
  • Loading branch information
dlubitz authored May 11, 2023
1 parent 3523ae6 commit 06f1d15
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,17 +317,17 @@ private function resolveNodeAddress(
$uriConstraints
);

if (!empty($this->options['uriSuffix']) && $nodeInfo->hasUriPath()) {
$uriConstraints = $uriConstraints->withPathSuffix($this->options['uriSuffix']);
if (!empty($this->options['uriPathSuffix']) && $nodeInfo->hasUriPath()) {
$uriConstraints = $uriConstraints->withPathSuffix($this->options['uriPathSuffix']);
}
return new ResolveResult($nodeInfo->getUriPath(), $uriConstraints, $nodeInfo->getRouteTags());
}


private function truncateRequestPathAndReturnRemainder(string &$requestPath): string
{
if (!empty($this->options['uriSuffix'])) {
$suffixPosition = strpos($requestPath, $this->options['uriSuffix']);
if (!empty($this->options['uriPathSuffix'])) {
$suffixPosition = strpos($requestPath, $this->options['uriPathSuffix']);
if ($suffixPosition === false) {
return '';
}
Expand Down

0 comments on commit 06f1d15

Please sign in to comment.