mirror of
https://github.com/grocy/grocy.git
synced 2025-10-14 01:04:01 +00:00
@@ -47,7 +47,7 @@ class SessionAuthMiddleware extends BaseMiddleware
|
|||||||
if ((!isset($_COOKIE[$this->SessionCookieName]) || !$sessionService->IsValidSession($_COOKIE[$this->SessionCookieName])) && $routeName !== 'login')
|
if ((!isset($_COOKIE[$this->SessionCookieName]) || !$sessionService->IsValidSession($_COOKIE[$this->SessionCookieName])) && $routeName !== 'login')
|
||||||
{
|
{
|
||||||
define('GROCY_AUTHENTICATED', false);
|
define('GROCY_AUTHENTICATED', false);
|
||||||
$response = $this->responseFactory->createResponse();
|
$response = $this->ResponseFactory->createResponse();
|
||||||
return $response->withHeader('Location', $this->AppContainer->get('UrlManager')->ConstructUrl('/login'));
|
return $response->withHeader('Location', $this->AppContainer->get('UrlManager')->ConstructUrl('/login'));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user