Updated Cache-Control header

This commit is contained in:
Chris Kankiewicz
2021-06-21 09:28:31 -07:00
parent ec0fcaad47
commit 4afbb18ab9

View File

@@ -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');
}
}