Skip to content

Commit

Permalink
Fix regression introduced in #2612
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ifox authored Oct 14, 2024
1 parent b47ff77 commit 042c87e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TwillRoutes.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ public function isTwillRequest(): bool
Str::startsWith($requestHost, config('twill.admin_app_subdomain', 'admin') . '.') && Str::endsWith($requestHost, '.' . $adminAppUrl)
: !config('twill.admin_app_strict') || $requestHost === $adminAppUrl;

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

return $matchesDomain && $matchesPath;
}
Expand Down

0 comments on commit 042c87e

Please sign in to comment.