Skip to content

Commit

Permalink
Update backTo() so we fallback to the referrer when no fingerprint.pa…
Browse files Browse the repository at this point in the history
…th exists (#66)
  • Loading branch information
jamesdb authored Jan 29, 2024
1 parent 7ca4c4d commit e559289
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Concerns/Impersonates.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function impersonate($record): bool|Redirector|RedirectResponse
}

session()->put([
'impersonate.back_to' => $this->getBackTo() ?? request('fingerprint.path') ?? Filament::getCurrentPanel()->getUrl(),
'impersonate.back_to' => $this->getBackTo() ?? request('fingerprint.path', request()->header('referer')) ?? Filament::getCurrentPanel()->getUrl(),
'impersonate.guard' => $this->getGuard()
]);

Expand Down

0 comments on commit e559289

Please sign in to comment.