git.cweiske.de
/
phancap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
34ef983
)
set expire header for css files in phar
author
Christian Weiske
<cweiske@cweiske.de>
Tue, 15 Apr 2014 09:54:04 +0000
(11:54 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Tue, 15 Apr 2014 09:54:04 +0000
(11:54 +0200)
src/phar-stub.php
patch
|
blob
|
history
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';
}
} else if( $path == '/') {
return 'www/index.php';
}
+
+ if (substr($path, -4) == '.css') {
+ header('Expires: ' . date('r', time() + 86400 * 7));
+ }
return 'www' . $path;
}
return 'www' . $path;
}