]> git.mxchange.org Git - friendica.git/commitdiff
Redirect AP requests to the root to the system actor
authorMichael <heluecht@pirati.ca>
Fri, 10 Feb 2023 10:29:35 +0000 (10:29 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 10 Feb 2023 10:29:35 +0000 (10:29 +0000)
src/Module/Home.php

index ab05497d3f36399e756c9afdc895768b5a034c0e..74cc88d30d95d032afd8f74d91ce5fb5f114dc3c 100644 (file)
@@ -25,13 +25,22 @@ use Friendica\BaseModule;
 use Friendica\Core\Hook;
 use Friendica\Core\Renderer;
 use Friendica\DI;
+use Friendica\Model\User;
 use Friendica\Module\Security\Login;
+use Friendica\Protocol\ActivityPub;
 
 /**
  * Home module - Landing page of the current node
  */
 class Home extends BaseModule
 {
+       protected function rawContent(array $request = [])
+       {
+               if (ActivityPub::isRequest()) {
+                       DI::baseUrl()->redirect(User::getActorName());
+               }
+       }
+
        protected function content(array $request = []): string
        {
                $app = DI::app();