summaryrefslogtreecommitdiff
path: root/inc/httputils.php
diff options
context:
space:
mode:
authorDominik Eckelmann <deckelmann@gmail.com>2014-02-15 10:59:18 +0100
committerDominik Eckelmann <deckelmann@gmail.com>2014-02-15 10:59:18 +0100
commit446b5b5934799f1f906ea8903b1e96c981f1c1b2 (patch)
tree3dcd29e77c4514d3fe547941e665899c005ebb00 /inc/httputils.php
parent40e0b44409037978b0bce4b451b1569c3bc3ee19 (diff)
downloadrpg-446b5b5934799f1f906ea8903b1e96c981f1c1b2.tar.gz
rpg-446b5b5934799f1f906ea8903b1e96c981f1c1b2.tar.bz2
FS#2388 give relative path to sendfile on nginx
Diffstat (limited to 'inc/httputils.php')
-rw-r--r--inc/httputils.php2
1 files changed, 2 insertions, 0 deletions
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;