Try 1 to fix the problem after Slim Framework 4 upgrade when running grocy in a subdirectory

This commit is contained in:
Bernd Bestel
2020-02-13 22:10:39 +01:00
parent 5dd78aa19a
commit c58b396a55
3 changed files with 49 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Container\ContainerInterface as Container;
use Slim\Factory\AppFactory;
use Selective\BasePath\BasePathMiddleware;
use Grocy\Helpers\UrlManager;
use Grocy\Controllers\LoginController;
@@ -70,6 +71,7 @@ require_once __DIR__ . '/routes.php';
// Add default middleware
$app->addRoutingMiddleware();
$app->add(new BasePathMiddleware($app));
$app->addErrorMiddleware(true, false, false);
$app->run();