Skip to content

Commit

Permalink
認証失敗時のリダイレクト先の調整 (#3198)
Browse files Browse the repository at this point in the history
  • Loading branch information
seto1 authored Mar 5, 2024
1 parent ae35815 commit 32cfe23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/baser-core/src/Controller/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ public function beforeFilter(EventInterface $event)
}
// リファラが存在する場合はリファラにリダイレクトする
// $this->referer() で判定した場合、リファラがなくてもトップのURLが返却されるため ServerRequest で判定
if ($this->getRequest()->getEnv('HTTP_REFERER')) {
if ($this->getRequest()->getEnv('HTTP_REFERER') &&
$this->getRequest()->getAttribute('here') !== $this->referer()
) {
$url = $this->referer();
} else {
$url = Configure::read("BcPrefixAuth.{$prefix}.loginRedirect");
Expand Down

0 comments on commit 32cfe23

Please sign in to comment.