diff --git a/module/file/control.php b/module/file/control.php index 8aaedb249f..d23018f8d7 100644 --- a/module/file/control.php +++ b/module/file/control.php @@ -502,10 +502,10 @@ class file extends control $mime = in_array($file->extension, $this->config->file->imageExtensions) ? "image/{$file->extension}" : $this->config->file->mimes['default']; header("Content-type: $mime"); - $cacheMaxAge = $this->config->cookieLife - time(); + $cacheMaxAge = 10 * 365 * 24 * 3600; header("Cache-Control: private"); header("Pragma: cache"); - header("Expires:" . gmdate("D, d M Y H:i:s", $this->config->cookieLife) . " GMT"); + header("Expires:" . gmdate("D, d M Y H:i:s", time() + $cacheMaxAge) . " GMT"); header("Cache-Control: max-age=$cacheMaxAge"); $handle = fopen($file->realPath, "r");