summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-08-20 13:43:31 +0300
committerAndrew Dolgov <[email protected]>2018-08-20 13:43:31 +0300
commit1b9ad78f1cbcea920030ed031490b67679c3d47e (patch)
tree7a5d59594940533f88f9854d637ed23d88b3403b
parent4d05ef87cbfda9a28358a65b5194118529d990d6 (diff)
only serve files from cache/
-rw-r--r--init.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/init.php b/init.php
index b024288..402ebaa 100644
--- a/init.php
+++ b/init.php
@@ -17,7 +17,8 @@ class Nginx_Xaccel extends Plugin {
function hook_send_local_file($filename) {
- if (defined('NGINX_XACCEL_PREFIX') && NGINX_XACCEL_PREFIX) {
+ if (defined('NGINX_XACCEL_PREFIX') && NGINX_XACCEL_PREFIX &&
+ mb_strpos($filename, "cache/") === 0) {
$mimetype = mime_content_type($filename);