force redirect to app_protocol
This commit is contained in:
parent
8e96aee7ab
commit
652d3365a1
2
.env
2
.env
@ -1,7 +1,7 @@
|
||||
# Symfony
|
||||
APP_ENV=PROD
|
||||
APP_SECRET=changemeinenvlocal
|
||||
APP_PROTOCOL=http
|
||||
APP_PROTOCOL=https
|
||||
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
|
||||
#TRUSTED_HOSTS='^(localhost|example\.com)$'
|
||||
|
||||
|
@ -11,7 +11,7 @@ class HomeController extends AbstractController
|
||||
{
|
||||
public function home()
|
||||
{
|
||||
return $this->redirectToRoute("app_scrum");
|
||||
return $this->redirectToRoute("app_login");
|
||||
}
|
||||
|
||||
public function admin()
|
||||
|
@ -200,10 +200,15 @@ class SecurityController extends AbstractController
|
||||
|
||||
// Redirection
|
||||
$redirect = $this->get('session')->get("_security.main.target_path");
|
||||
if($redirect)
|
||||
return $this->redirect($redirect);
|
||||
else
|
||||
return $this->redirect($this->generateUrl('app_home'));
|
||||
if($redirect) {
|
||||
$redirect=str_replace("http://",$this->getParameter("appProtocol")."://",$redirect);
|
||||
|
||||
}
|
||||
else {
|
||||
$redirect=$this->generateUrl('app_home');
|
||||
$redirect=str_replace("http://",$this->getParameter("appProtocol")."://",$redirect);
|
||||
}
|
||||
return $this->redirect($redirect);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user