From 1f4e12819778dc119fd0733e981d6755f7c8a584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Danyi?= Date: Tue, 15 Aug 2017 17:07:39 +0200 Subject: [PATCH] * avatar cache expiry --- src/App/Action/AvatarAction.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/App/Action/AvatarAction.php b/src/App/Action/AvatarAction.php index fe5366b..ed6b298 100644 --- a/src/App/Action/AvatarAction.php +++ b/src/App/Action/AvatarAction.php @@ -26,8 +26,9 @@ class AvatarAction implements ServerMiddlewareInterface } $avatarData = $this->avatarService->getAvatarData($signum); - return new TextResponse($avatarData, 200, [ + return (new TextResponse($avatarData, 200, [ 'content-type' => 'image/png', - ]); + ]))->withHeader('Expires', '0') + ->withHeader('Cache-Control', 'must-revalidate'); } }