Skip to content

Commit

Permalink
Use getPath instead of getUrl, because getUrl returns the login route…
Browse files Browse the repository at this point in the history
… when not authenticated and that messes up password reset
  • Loading branch information
jyrkidn committed Apr 8, 2024
1 parent f0ed1d0 commit 81831b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ function is_filament_livewire_route($request): bool

if (is_livewire_route($request) && $request->server('HTTP_REFERER')) {
$referer = $request->server('HTTP_REFERER');

$isFilament = collect(Filament::getPanels())
->contains(fn (Panel $panel) => Str::startsWith($referer, $panel->getUrl()));
->contains(fn (Panel $panel) => Str::startsWith($referer, url($panel->getPath())));

if ($isFilament) {
return true;
Expand Down

0 comments on commit 81831b4

Please sign in to comment.