]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Friendica.php
head fixings
[friendica.git] / src / Module / Friendica.php
index 74d9309bdb280bcd2eb9cf301b75b270d7d6c0c6..3fccda5f859ddd429adb34a8e21e23e3c521ca83 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -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 = [