mirror of
https://github.com/grocy/grocy.git
synced 2025-10-14 09:11:11 +00:00
Use absolute URLs everywhere, this should fix #3
This commit is contained in:
@@ -5,8 +5,8 @@ namespace Grocy\Middleware;
|
||||
class BaseMiddleware
|
||||
{
|
||||
public function __construct(\Slim\Container $container) {
|
||||
$this->container = $container;
|
||||
$this->AppContainer = $container;
|
||||
}
|
||||
|
||||
protected $container;
|
||||
protected $AppContainer;
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ class SessionAuthMiddleware extends BaseMiddleware
|
||||
$sessionService = new SessionService();
|
||||
if ((!isset($_COOKIE['grocy_session']) || !$sessionService->IsValidSession($_COOKIE['grocy_session'])) && $routeName !== 'login')
|
||||
{
|
||||
$response = $response->withRedirect('/login');
|
||||
$response = $response->withRedirect($this->AppContainer->UrlManager->ConstructUrl('/login'));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user