Avoid leaking file descriptor when looking for binary files
[phorkie.git] / src / stub-phar.php
index 9b65f2fabdf7c7c15a4f01b44f7e90bfd0d1d506..95e894cb123d6f3420f3eff1b6acb2c76d3bc85b 100644 (file)
@@ -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;