summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpierre.pracht <pierre.pracht@gmail.com>2008-03-15 16:56:31 +0100
committerpierre.pracht <pierre.pracht@gmail.com>2008-03-15 16:56:31 +0100
commitdeec6eb9c776aec05d7d3b91105b594b15900665 (patch)
tree3d37b74bbf6ce3237f9e2b1cfc5a0c250421f9a2
parentcf626a6236779bdb9ec627f48c0c281eac166b57 (diff)
downloadrpg-deec6eb9c776aec05d7d3b91105b594b15900665.tar.gz
rpg-deec6eb9c776aec05d7d3b91105b594b15900665.tar.bz2
Propritary Nginx X-Accel-Redirect header
Example nginx configuration : location /var/www/dokuwiki0/ { internal; alias /var/www/dokuwiki/dokuwiki0/; } darcs-hash:20080315155631-b0461-68c08d68660e554c62a748c1954699791decd000.gz
-rw-r--r--lib/exe/fetch.php3
-rw-r--r--lib/plugins/config/lang/en/lang.php1
-rw-r--r--lib/plugins/config/settings/config.metadata.php2
3 files changed, 5 insertions, 1 deletions
diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php
index 8087cbd07..ccab73fa9 100644
--- a/lib/exe/fetch.php
+++ b/lib/exe/fetch.php
@@ -120,6 +120,9 @@ function sendFile($file,$mime,$cache){
}elseif($conf['xsendfile'] == 2){
header("X-Sendfile: $file");
exit;
+ }elseif($conf['xsendfile'] == 3){
+ header("X-Accel-Redirect: $file");
+ exit;
}
//support download continueing
diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php
index 7d880dd3e..07bccf1d9 100644
--- a/lib/plugins/config/lang/en/lang.php
+++ b/lib/plugins/config/lang/en/lang.php
@@ -208,3 +208,4 @@ $lang['compression_o_bz2'] = 'bz2';
$lang['xsendfile_o_0'] = "don't use";
$lang['xsendfile_o_1'] = 'Propritary lighttpd header (before release 1.5)';
$lang['xsendfile_o_2'] = 'Standard X-Sendfile header';
+$lang['xsendfile_o_3'] = 'Propritary Nginx X-Accel-Redirect header';
diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php
index 7ddce104b..52db12a5e 100644
--- a/lib/plugins/config/settings/config.metadata.php
+++ b/lib/plugins/config/settings/config.metadata.php
@@ -171,7 +171,7 @@ $meta['rss_update'] = array('numeric');
$meta['recent_days'] = array('numeric');
$meta['rss_show_summary'] = array('onoff');
$meta['broken_iua'] = array('onoff');
-$meta['xsendfile'] = array('multichoice','_choices' => array(0,1,2));
+$meta['xsendfile'] = array('multichoice','_choices' => array(0,1,2,3));
$meta['xmlrpc'] = array('onoff');
$meta['renderer_xhtml'] = array('renderer','_format' => 'xhtml','_choices' => array('xhtml'));