Fix gravatar: set content-type header and size

Fixes #2254
This commit is contained in:
Dirk Goetz 2022-03-22 15:35:44 +01:00 committed by Johannes Meyer
parent 0c325eb027
commit d5d714b1ee
2 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@ class StaticController extends Controller
{
$response = $this->getResponse();
$response->setHeader('Cache-Control', 'public, max-age=1814400, stale-while-revalidate=604800', true);
$response->setHeader('Content-Type', 'image/png', true);
$noCache = $this->getRequest()->getHeader('Cache-Control') === 'no-cache'
|| $this->getRequest()->getHeader('Pragma') === 'no-cache';

View File

@ -6,7 +6,7 @@
<h1><?= $this->translate('Contact details') ?></h1>
<div class="circular" style="background-image: url('<?=
$this->href('static/gravatar', array('email' => $contact->contact_email))
?>')"></div>
?>';width:120px;height:120px;)"></div>
<?php if (! $contact): ?>
<?= $this->translate('No such contact') ?>: <?= $contactName ?>