From 534df2ca32e46ae1abbfe6be9329727de7dd9532 Mon Sep 17 00:00:00 2001 From: nelsonlaquet Date: Sun, 1 Sep 2013 06:26:56 -0500 Subject: [PATCH] fixed headers --- app/controllers/ImagesController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/ImagesController.php b/app/controllers/ImagesController.php index 8af6afc4..e08dcd92 100644 --- a/app/controllers/ImagesController.php +++ b/app/controllers/ImagesController.php @@ -27,6 +27,11 @@ $response->header('Content-Disposition', 'filename="' . $filename . '"'); $response->header('Content-Type', 'image/png'); + $lastModified = filemtime($filename); + + header('Last-Modified: ' . $lastModified); + header('Cache-Control: max-age=' . (60 * 60 * 24 * 7)); + return $response; } } \ No newline at end of file