git.cweiske.de
/
phancap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
set expire header for css files in phar
[phancap.git]
/
src
/
phar-stub.php
diff --git
a/src/phar-stub.php
b/src/phar-stub.php
index 5188983d2739e548a0feaa9ac5418325defaaea1..b5cdf4d8f43165567d82fa1a0dfa3b9efe3f930b 100644
(file)
--- 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;
}