mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-25 15:01:16 +02:00
Updated Cache-Control header
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user