Skip to content

Commit

Permalink
Fix trailing question mark
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Nov 7, 2024
1 parent b65c92e commit c05b921
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/services/CacheRequestService.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,14 @@ public function getRequestedCacheableSiteUri(): ?SiteUriModel
}
}

$allowedQueryString = '';
if (Blitz::$plugin->settings->queryStringCaching === SettingsModel::QUERY_STRINGS_DO_NOT_CACHE_URLS) {
$uri .= '?' . $queryString;
$allowedQueryString = $queryString;
} elseif (Blitz::$plugin->settings->queryStringCaching === SettingsModel::QUERY_STRINGS_CACHE_URLS_AS_UNIQUE_PAGES) {
$allowedQueryString = $this->getAllowedQueryString($site->id, '?' . $queryString);
if ($allowedQueryString) {
$uri .= '?' . $allowedQueryString;
}
}
if ($allowedQueryString) {
$uri .= '?' . $allowedQueryString;
}

return new SiteUriModel([
Expand Down

0 comments on commit c05b921

Please sign in to comment.