From 03b8ff4db939d6ad4fc6c6ccfacb87afdca7aabc Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 15 Apr 2014 11:54:04 +0200 Subject: [PATCH] set expire header for css files in phar --- src/phar-stub.php | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.30.2