From 446b5b5934799f1f906ea8903b1e96c981f1c1b2 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann <deckelmann@gmail.com> Date: Sat, 15 Feb 2014 10:59:18 +0100 Subject: [PATCH] FS#2388 give relative path to sendfile on nginx --- inc/httputils.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/httputils.php b/inc/httputils.php index fdf453a8c..d6532720f 100644 --- a/inc/httputils.php +++ b/inc/httputils.php @@ -80,6 +80,8 @@ function http_sendfile($file) { ob_end_clean(); exit; }elseif($conf['xsendfile'] == 3){ + // FS#2388 nginx just needs the relative path. + $file = DOKU_REL.substr($file, strlen(fullpath(DOKU_INC)) + 1); header("X-Accel-Redirect: $file"); ob_end_clean(); exit; -- GitLab