From: Christian Weiske Date: Tue, 15 Apr 2014 09:54:04 +0000 (+0200) Subject: set expire header for css files in phar X-Git-Tag: v0.1.0~8 X-Git-Url: https://git.cweiske.de/phancap.git/commitdiff_plain/03b8ff4db939d6ad4fc6c6ccfacb87afdca7aabc?ds=sidebyside set expire header for css files in phar --- diff --git a/src/phar-stub.php b/src/phar-stub.php index 5188983..b5cdf4d 100644 --- a/src/phar-stub.php +++ b/src/phar-stub.php @@ -42,6 +42,10 @@ function rewritePath($path) } else if( $path == '/') { return 'www/index.php'; } + + if (substr($path, -4) == '.css') { + header('Expires: ' . date('r', time() + 86400 * 7)); + } return 'www' . $path; }