Skip to content

Commit

Permalink
bitExpert#26 Fixed redirecting
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Horn committed Mar 20, 2017
1 parent 7b3bc3e commit af7e75f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Controller/LoginCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function execute()
$this->session->setAfterLoginReferer($path);

$this->response->setNoCacheHeaders();
$this->response->setRedirect($targetUrl);
$this->response->setRedirect($this->getRedirectUrl($targetUrl));
$this->response->sendResponse();
}

Expand Down Expand Up @@ -165,6 +165,19 @@ protected function extendIgnoreUrls(array $ignoreUrls)
return $ignoreUrls;
}

/**
* @param string $targetUrl
* @return string
*/
protected function getRedirectUrl($targetUrl)
{
return \sprintf(
'%s%s',
$this->_url->getBaseUrl(),
$targetUrl
);
}

/**
* @return string
*/
Expand Down

0 comments on commit af7e75f

Please sign in to comment.