From 6ad5fbe2a5a5fd752f5a41edf178c3bf0401ab1e Mon Sep 17 00:00:00 2001 From: polytan02 Date: Thu, 22 Dec 2016 02:42:11 +0000 Subject: [PATCH] Update of manifest.json to request further parameters --- conf/config_local.php | 23 ++++++++++++ manifest.json | 19 ++++++++++ scripts/backup | 1 - scripts/install | 14 ++++---- scripts/remove | 1 - scripts/upgrade | 7 ++++ sources/.htaccess | 82 +++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 139 insertions(+), 8 deletions(-) create mode 100644 conf/config_local.php create mode 100644 sources/.htaccess diff --git a/conf/config_local.php b/conf/config_local.php new file mode 100644 index 0000000..91e0b73 --- /dev/null +++ b/conf/config_local.php @@ -0,0 +1,23 @@ + + + XSendFile on + + + +########################################### +# If the notation above don't work, you can try that one +# Disclaimer : I'm no apache expert it can be bad security wise :( +########################################### +#XSendFile On +#XSendFileAllowAbove on + +########################################### +# On WAMP one user had to add this line in his httpd.conf +# None of the above was working +########################################### +#XSendFilePath + +########################################### +# If you want to use user based configuration with +# apache 2.4 + php-fpm enable this +# https://github.com/seblucas/cops/issues/213 +########################################### +#SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 + + +RewriteEngine on +RewriteRule ^download/(\d*)/(\d*)/.*\.kepub\.epub$ fetch.php?data=$1&db=$2&type=epub [L] +RewriteRule ^download/(\d*)/(\d*)/.*\.(.*)$ fetch.php?data=$1&db=$2&type=$3 [L] +RewriteRule ^download/(\d*)/.*\.kepub\.epub$ fetch.php?data=$1&type=epub [L] +RewriteRule ^download/(\d*)/.*\.(.*)$ fetch.php?data=$1&type=$2 [L] + + + +ExpiresActive on + +# Data +ExpiresByType text/xml "access plus 0 seconds" +ExpiresByType application/xml "access plus 0 seconds" +ExpiresByType application/json "access plus 0 seconds" +ExpiresByType application/xhtml+xml "access plus 0 seconds" + +# Favicon (cannot be renamed) +ExpiresByType image/x-icon "access plus 1 week" + +# Media: images +ExpiresByType image/png "access plus 1 month" +ExpiresByType image/jpg "access plus 1 month" +ExpiresByType image/jpeg "access plus 1 month" + +# Webfonts +ExpiresByType font/truetype "access plus 1 month" +ExpiresByType font/opentype "access plus 1 month" +ExpiresByType application/x-font-woff "access plus 1 month" +ExpiresByType image/svg+xml "access plus 1 month" +ExpiresByType application/vnd.ms-fontobject "access plus 1 month" + +# CSS and JavaScript +ExpiresByType text/css "access plus 1 year" +ExpiresByType application/javascript "access plus 1 year" +ExpiresByType text/javascript "access plus 1 year" + + +########################################### +# Uncomment if you wish to protect access with a password +########################################### +# If your covers and books are not available as soon as you protect it +# You can try replacing the FilesMatch directive by this one +# +# it helps for Sony PRS-TX and Aldiko, but beware fetch.php can be accessed +# without authentication (see $config ['cops_fetch_protect'] for a workaround). +########################################### +# +#AuthUserFile /path/to/file +#AuthGroupFile /dev/null +#AuthName "Acces securise" +#AuthType Basic +#Require valid-user +#