Merge pull request #11381 from annando/friendica-actor

Avoid returning of the actor when requesting friendica/json
This commit is contained in:
Tobias Diekershoff 2022-03-28 15:38:03 +02:00 committed by GitHub
commit 173e72169b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 = [