From 4afbb18ab91b409710a142b1fd8a18c443f3bdbe Mon Sep 17 00:00:00 2001 From: Chris Kankiewicz Date: Mon, 21 Jun 2021 09:28:31 -0700 Subject: [PATCH] Updated Cache-Control header --- app/src/Middlewares/CacheMiddleware.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/Middlewares/CacheMiddleware.php b/app/src/Middlewares/CacheMiddleware.php index 11c3b12..65953fe 100644 --- a/app/src/Middlewares/CacheMiddleware.php +++ b/app/src/Middlewares/CacheMiddleware.php @@ -25,10 +25,10 @@ class CacheMiddleware foreach ($this->config->get('http_cache') as $contentType => $age) { if (in_array($contentType, $response->getHeader('Content-Type'))) { - return $response->withHeader('Cache-Control', sprintf('max-age=%d', $age)); + return $response->withHeader('Cache-Control', sprintf('max-age=%d, private, must-revalidate', $age)); } } - return $response->withHeader('Cache-Control', 'max-age=0'); + return $response->withHeader('Cache-Control', 'max-age=0, private, must-revalidate'); } }