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
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
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();

View File

@ -7,6 +7,7 @@
"php-di/php-di": "^6.0",
"rubellum/slim-blade-view": "^0.1.1",
"tuupola/cors-middleware": "^1.1",
"selective/basepath": "^0.2.0",
"morris/lessql": "^0.4.1",
"gettext/gettext": "^4.8",
"eluceo/ical": "^0.16.0",

47
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "9c7420e77a3f1afb59e00560d5b9081c",
"content-hash": "b1fde916a45ad371e89da8c603362c0c",
"packages": [
{
"name": "doctrine/inflector",
@ -1652,6 +1652,51 @@
],
"time": "2016-03-11T02:32:00+00:00"
},
{
"name": "selective/basepath",
"version": "0.2.0",
"source": {
"type": "git",
"url": "https://github.com/selective-php/basepath.git",
"reference": "58566c248279a0035012c393b669619ff3a140ee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/selective-php/basepath/zipball/58566c248279a0035012c393b669619ff3a140ee",
"reference": "58566c248279a0035012c393b669619ff3a140ee",
"shasum": ""
},
"require": {
"php": "^7.1",
"psr/http-server-middleware": "^1.0"
},
"require-dev": {
"overtrue/phplint": "^1.1",
"phpstan/phpstan-shim": "^0.11",
"phpunit/phpunit": "^7",
"slim/psr7": "^0.6.0",
"slim/slim": "^4.3",
"squizlabs/php_codesniffer": "^3.4"
},
"type": "library",
"autoload": {
"psr-4": {
"Selective\\BasePath\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "A URL base path detector for Slim 4",
"homepage": "https://github.com/selective-php/basepath",
"keywords": [
"basepath",
"slim",
"slim4"
],
"time": "2019-11-24T21:59:39+00:00"
},
{
"name": "slim/http",
"version": "1.0.0",