diff --git a/framework/core/src/Forum/Server.php b/framework/core/src/Forum/Server.php index 18df07f7b..49f3a5235 100644 --- a/framework/core/src/Forum/Server.php +++ b/framework/core/src/Forum/Server.php @@ -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')); diff --git a/framework/core/src/Foundation/Application.php b/framework/core/src/Foundation/Application.php index 0571fa722..7b18af206 100644 --- a/framework/core/src/Foundation/Application.php +++ b/framework/core/src/Foundation/Application.php @@ -611,7 +611,7 @@ class Application extends Container implements ApplicationContract */ public function isDownForMaintenance() { - return false; + return $this->config('offline'); } /**