mirror of
https://github.com/friendica/friendica
synced 2025-04-25 23:10:12 +00:00
Make requested changes
This commit is contained in:
parent
6a5266c6b8
commit
40783db161
5 changed files with 10 additions and 13 deletions
|
@ -90,8 +90,6 @@ class Friendica extends BaseModule
|
|||
$blocked = null;
|
||||
}
|
||||
|
||||
header('Vary: Accept', false);
|
||||
|
||||
$hooked = '';
|
||||
|
||||
Hook::callAll('about_hook', $hooked);
|
||||
|
@ -117,6 +115,8 @@ class Friendica extends BaseModule
|
|||
|
||||
protected function rawContent(array $request = [])
|
||||
{
|
||||
header('Vary: Accept', false);
|
||||
|
||||
// @TODO: Replace with parameter from router
|
||||
if (DI::args()->getArgc() <= 1 || (DI::args()->getArgv()[1] !== 'json')) {
|
||||
if (!ActivityPub::isRequest()) {
|
||||
|
@ -127,7 +127,6 @@ class Friendica extends BaseModule
|
|||
$data = ActivityPub\Transmitter::getProfile(0);
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header('Cache-Control: max-age=23200, stale-while-revalidate=23200');
|
||||
header('Vary: Accept', false);
|
||||
System::jsonExit($data, 'application/activity+json');
|
||||
} catch (HTTPException\NotFoundException $e) {
|
||||
System::jsonError(404, ['error' => 'Record not found']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue