diff --git a/app/controllers/general.php b/app/controllers/general.php index d3cd0879ab..473ee01a7c 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -407,6 +407,7 @@ App::get('/manifest.json') ->desc('Progressive app manifest file') ->label('scope', 'public') ->label('docs', false) + ->inject('response') ->action(function ($response) { /** @var Appwrite\Utopia\Response $response */ @@ -427,30 +428,34 @@ App::get('/manifest.json') ], ], ]); - }, ['response']); + }); App::get('/robots.txt') ->desc('Robots.txt File') ->label('scope', 'public') ->label('docs', false) + ->inject('response') ->action(function ($response) { $template = new View(__DIR__.'/../views/general/robots.phtml'); $response->text($template->render(false)); - }, ['response']); + }); App::get('/humans.txt') ->desc('Humans.txt File') ->label('scope', 'public') ->label('docs', false) + ->inject('response') ->action(function ($response) { $template = new View(__DIR__.'/../views/general/humans.phtml'); $response->text($template->render(false)); - }, ['response']); + }); App::get('/.well-known/acme-challenge') ->desc('SSL Verification') ->label('scope', 'public') ->label('docs', false) + ->inject('request') + ->inject('response') ->action(function ($request, $response) { $base = \realpath(APP_STORAGE_CERTIFICATES); $path = \str_replace('/.well-known/acme-challenge/', '', $request->getParam('q')); @@ -479,7 +484,7 @@ App::get('/.well-known/acme-challenge') } $response->text($content); - }, ['request', 'response']); + }); include_once __DIR__ . '/shared/api.php'; include_once __DIR__ . '/shared/web.php';