mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 00:43:54 +08:00
Fix admin error handling
This commit is contained in:
parent
ba769e0c7e
commit
8edc8223e5
|
@ -29,11 +29,8 @@ class Server extends AbstractServer
|
||||||
|
|
||||||
if ($app->isInstalled()) {
|
if ($app->isInstalled()) {
|
||||||
$path = parse_url($app->url('admin'), PHP_URL_PATH);
|
$path = parse_url($app->url('admin'), PHP_URL_PATH);
|
||||||
$errorDir = __DIR__.'/../../error';
|
|
||||||
|
|
||||||
// All requests should first be piped through our global error handler
|
$pipe->pipe($path, $app->make('Flarum\Http\Middleware\HandleErrors', ['debug' => $app->inDebugMode() || ! $app->isUpToDate()]));
|
||||||
$debugMode = ! $app->isUpToDate() || $app->inDebugMode();
|
|
||||||
$pipe->pipe($path, new HandleErrors($errorDir, $app->make('log'), $debugMode));
|
|
||||||
|
|
||||||
if ($app->isUpToDate()) {
|
if ($app->isUpToDate()) {
|
||||||
$pipe->pipe($path, $app->make('Flarum\Http\Middleware\ParseJsonBody'));
|
$pipe->pipe($path, $app->make('Flarum\Http\Middleware\ParseJsonBody'));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user