mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 00:23:13 +08:00
Allow forum to be taken offline via config
This commit is contained in:
parent
67e9e23df1
commit
094ad74abc
|
@ -34,7 +34,7 @@ class Server extends AbstractServer
|
|||
|
||||
$pipe->pipe($basePath, $app->make('Flarum\Http\Middleware\DispatchRoute', ['routes' => $app->make('flarum.install.routes')]));
|
||||
$pipe->pipe($basePath, new HandleErrors($errorDir, true));
|
||||
} elseif ($app->isUpToDate()) {
|
||||
} elseif ($app->isUpToDate() && ! $app->isDownForMaintenance()) {
|
||||
$pipe->pipe($basePath, $app->make('Flarum\Http\Middleware\ParseJsonBody'));
|
||||
$pipe->pipe($basePath, $app->make('Flarum\Http\Middleware\AuthenticateWithCookie'));
|
||||
$pipe->pipe($basePath, $app->make('Flarum\Http\Middleware\StartSession'));
|
||||
|
|
|
@ -611,7 +611,7 @@ class Application extends Container implements ApplicationContract
|
|||
*/
|
||||
public function isDownForMaintenance()
|
||||
{
|
||||
return false;
|
||||
return $this->config('offline');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user