Skip to content

Commit 042c87e

Browse files
authored
Fix regression introduced in #2612
With the default path set to `admin`, `/adminsomething`, eg. `/administration` would trigger the Twill 404 error instead of the frontend 404 due to the start of the path matching.
1 parent b47ff77 commit 042c87e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TwillRoutes.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ public function isTwillRequest(): bool
414414
Str::startsWith($requestHost, config('twill.admin_app_subdomain', 'admin') . '.') && Str::endsWith($requestHost, '.' . $adminAppUrl)
415415
: !config('twill.admin_app_strict') || $requestHost === $adminAppUrl;
416416

417-
$matchesPath = empty(config('twill.admin_app_path')) || request()->is(config('twill.admin_app_path', '') . '*');
417+
$matchesPath = empty(config('twill.admin_app_path')) || request()->is(config('twill.admin_app_path', '') . '/*');
418418

419419
return $matchesDomain && $matchesPath;
420420
}

0 commit comments

Comments
 (0)