Skip to content

Commit

Permalink
Quick fix for the version issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Dec 9, 2024
1 parent af3efc7 commit 896c640
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Content/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,9 @@ protected function previewTokenFromUrl(string $url): string|null
{
$localPrefix = $this->model->kirby()->url('base') . '/';

if (Str::startsWith($url, $localPrefix) === false) {
// Todo: this is only a quick fix to get home page previews working again,
// we need to double-check if this is still correct
if (Str::startsWith($url, $localPrefix) === false && $url . '/' !== $localPrefix) {
return null;
}

Expand Down

0 comments on commit 896c640

Please sign in to comment.