Centralize Vary header declaration in ActivityPub::isRequest

- Vary header should be set every time we vary the display based on an HTTP header value
This commit is contained in:
Hypolite Petovan 2023-07-08 21:01:48 -04:00
parent 31fbe70ec7
commit 6e2ab6c3af
7 changed files with 7 additions and 8 deletions

View file

@ -80,8 +80,6 @@ class Profile extends BaseProfile
protected function rawContent(array $request = [])
{
header('Vary: Accept', false);
if (ActivityPub::isRequest()) {
$user = $this->database->selectFirst('user', ['uid'], ['nickname' => $this->parameters['nickname'] ?? '', 'account_removed' => false]);
if ($user) {