mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix #2167 allow removing no-store and must-revalidate from Cache-Control headers
This commit is contained in:
parent
35dec01ab0
commit
15648d10d1
6 changed files with 29 additions and 1 deletions
|
|
@ -481,9 +481,11 @@ class Context
|
|||
*/
|
||||
public static function setCacheControl($ttl = 0, $public = true)
|
||||
{
|
||||
$cache_control_header = config('cache.cache_control') ?? 'must-revalidate, no-store, no-cache';
|
||||
|
||||
if($ttl == 0)
|
||||
{
|
||||
header('Cache-Control: ' . ($public ? '' : 'private, ') . 'must-revalidate, no-store, no-cache');
|
||||
header('Cache-Control: ' . ($public ? '' : 'private, ') . $cache_control_header);
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue