From: Michael Date: Mon, 28 Mar 2022 13:12:45 +0000 (+0000) Subject: Avoid returning of the actor when requesting friendica/json X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=51b2bf6f70c45a445bc83fd1b190eb758334d5ba;p=friendica.git Avoid returning of the actor when requesting friendica/json --- diff --git a/src/Module/Friendica.php b/src/Module/Friendica.php index 87edf14ca8..3fccda5f85 100644 --- a/src/Module/Friendica.php +++ b/src/Module/Friendica.php @@ -112,7 +112,12 @@ class Friendica extends BaseModule protected function rawContent(array $request = []) { - if (ActivityPub::isRequest()) { + // @TODO: Replace with parameter from router + if (DI::args()->getArgc() <= 1 || (DI::args()->getArgv()[1] !== 'json')) { + if (!ActivityPub::isRequest()) { + return; + } + try { $data = ActivityPub\Transmitter::getProfile(0); header('Access-Control-Allow-Origin: *'); @@ -123,11 +128,6 @@ class Friendica extends BaseModule } } - // @TODO: Replace with parameter from router - if (DI::args()->getArgc() <= 1 || (DI::args()->getArgv()[1] !== 'json')) { - return; - } - $config = DI::config(); $register_policies = [