// Relaxed CORS header for public items
header('Access-Control-Allow-Origin: *');
+ header('Vary: Accept', false);
+
System::jsonExit($data, 'application/activity+json');
}
}
$blocked = null;
}
+ header('Vary: Accept', false);
+
$hooked = '';
Hook::callAll('about_hook', $hooked);
$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']);
$output .= $this->getDisplayData($item);
+ header('Vary: Accept', false);
+
return $output;
}
$data = ActivityPub\Transmitter::getProfile($user['uid']);
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']);
System::jsonError(404, []);
}
}
+
+ header('Vary: Accept', false);
}
protected function content(array $request = []): string
]
];
header('Access-Control-Allow-Origin: *');
+ header('Vary: Accept', false);
System::jsonExit($json, 'application/jrd+json; charset=utf-8');
}
];
header('Access-Control-Allow-Origin: *');
+ header('Vary: Accept', false);
System::jsonExit($json, 'application/jrd+json; charset=utf-8');
}
]);
header('Access-Control-Allow-Origin: *');
-
+ header('Vary: Accept', false);
System::httpExit($xmlString, Response::TYPE_XML, 'application/xrd+xml');
}
}