From d5d714b1eeb7c3cfb5893afef673579f3ad078b4 Mon Sep 17 00:00:00 2001 From: Dirk Goetz Date: Tue, 22 Mar 2022 15:35:44 +0100 Subject: [PATCH] Fix gravatar: set content-type header and size Fixes #2254 --- application/controllers/StaticController.php | 1 + modules/monitoring/application/views/scripts/show/contact.phtml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/application/controllers/StaticController.php b/application/controllers/StaticController.php index d75ef7243..6e434766f 100644 --- a/application/controllers/StaticController.php +++ b/application/controllers/StaticController.php @@ -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'; diff --git a/modules/monitoring/application/views/scripts/show/contact.phtml b/modules/monitoring/application/views/scripts/show/contact.phtml index 671d24579..aa448ae47 100644 --- a/modules/monitoring/application/views/scripts/show/contact.phtml +++ b/modules/monitoring/application/views/scripts/show/contact.phtml @@ -6,7 +6,7 @@

translate('Contact details') ?>

+ ?>';width:120px;height:120px;)"> translate('No such contact') ?>: