From: Christian Weiske Date: Wed, 9 Jul 2014 16:25:22 +0000 (+0200) Subject: send cache headers for static phorkie .png files X-Git-Tag: v0.4.0~6 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/90f0bc1550eb0e5291f215552b22143fbe5e9398?ds=sidebyside send cache headers for static phorkie .png files --- diff --git a/src/stub-phar.php b/src/stub-phar.php index 9b65f2f..95e894c 100644 --- a/src/stub-phar.php +++ b/src/stub-phar.php @@ -47,7 +47,10 @@ function rewritePath($path) $path = rewriteWithHtaccess($path); - if (substr($path, -4) == '.css' || substr($path, -3) == '.js') { + if (substr($path, -4) == '.css' + || substr($path, -3) == '.js' + || substr($path, 0, 9) == '/phorkie/' + ) { header('Expires: ' . date('r', time() + 86400 * 7)); } return 'www' . $path;