Merge pull request #12784 from annando/redirect-root

Redirect AP requests to the root to the system actor
pull/12791/head
Hypolite Petovan 2023-02-10 08:10:36 -05:00 zatwierdzone przez GitHub
commit 02f6d0e5f9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -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();