1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 15:34:26 +02:00

Show 404 errors as the "pretty" page even in debug mode

closes #503
This commit is contained in:
Toby Zerner
2015-10-14 12:23:20 +10:30
parent 9772e398f6
commit 60bdbe6e52
3 changed files with 23 additions and 13 deletions

View File

@@ -37,11 +37,8 @@ class Server extends AbstractServer
$pipe->pipe($adminPath, $app->make('Flarum\Admin\Middleware\RequireAdministrateAbility'));
$pipe->pipe($adminPath, $app->make('Flarum\Http\Middleware\DispatchRoute', compact('routes')));
if ($app->inDebugMode()) {
$pipe->pipe(new WhoopsMiddleware);
} else {
$pipe->pipe(new HandleErrors(__DIR__.'/../../error'));
}
$pipe->pipe(new HandleErrors(__DIR__.'/../../error', $app->inDebugMode()));
}
return $pipe;