Skip to content

Commit 85ab5b7

Browse files
committed
ensure urls passed to utility dont end with /
1 parent 0669725 commit 85ab5b7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Http/Controllers/UtilityController.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ public function __invoke(): array
3030

3131
// remove any non-wildcards first
3232
$urls->reject(fn ($url) => Str::endsWith($url, '*'))
33-
->each(fn ($url) => Tracker::remove($url));
33+
->each(function ($url) {
34+
if (Str::endsWith($url, '/')) {
35+
$url = substr($url, 0, -1);
36+
}
37+
38+
Tracker::remove($url);
39+
});
3440

3541
collect(Tracker::all())
3642
->each(function ($data) use ($wildcards) {

0 commit comments

Comments
 (0)