Skip to content

Commit 9991ea4

Browse files
committed
no longer needed
1 parent d3c23dd commit 9991ea4

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/StaticCaching/Cachers/FileCacher.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,7 @@ public function getFilePath($url, $site = null)
167167
$urlParts = parse_url($url);
168168
$pathParts = pathinfo($urlParts['path']);
169169
$slug = $pathParts['basename'];
170-
$query = Arr::get($urlParts, 'query', '');
171-
172-
if ($this->config('ignore_query_strings')) {
173-
$allowedQueryParams = collect($this->config('allowed_query_parameters', []))
174-
->map(fn ($param) => Str::ensureRight($param, '='))
175-
->all();
176-
177-
$query = collect(explode('&', $query))->filter(function ($param) use ($allowedQueryParams) {
178-
return Str::startsWith($param, $allowedQueryParams);
179-
})->implode('&');
180-
}
170+
$query = $this->config('ignore_query_strings') ? '' : Arr::get($urlParts, 'query', '');
181171

182172
if ($this->isBasenameTooLong($basename = $slug.'_'.$query.'.html')) {
183173
$basename = $slug.'_lqs_'.md5($query).'.html';

0 commit comments

Comments
 (0)