aboutsummaryrefslogtreecommitdiff
path: root/p/api
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-01-02 21:36:33 +0100
committerGravatar GitHub <noreply@github.com> 2019-01-02 21:36:33 +0100
commita6623b7b2fa3f026a0ea30e49b1a221f7a4a8e55 (patch)
treea63944268e9c8c28ea97fcdde4f8d132344d7358 /p/api
parent92de09bac41d320decb31e6caf2e9b78fab484f7 (diff)
Apache performance (#2202)
* Apache performance API: Use SetEnvIf if available and fallback to RewriteRule Docker: Disable unused modules. Docker: Hard-include .htaccess to avoid having to scan for changes in that file. Docker: Disable security check of symlinks, which we do not use ayway. * Apache readme * Docker/Apache tuning Run cron job with correct www-data user instead of root Remove PHP GMP module uneeded for 64-bit Docker image Add option to mount custom .htaccess for HTTP authentication Re-add Apache module for HTTP authentication Move Alpine-specific instructions to Docker file (instead of Apache conf) to make it easier to have other base images than Alpine
Diffstat (limited to 'p/api')
-rw-r--r--p/api/.htaccess11
1 files changed, 8 insertions, 3 deletions
diff --git a/p/api/.htaccess b/p/api/.htaccess
index 41b653d96..937983ec9 100644
--- a/p/api/.htaccess
+++ b/p/api/.htaccess
@@ -1,4 +1,9 @@
-<IfModule mod_rewrite.c>
- RewriteEngine on
- RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+<IfModule mod_setenvif.c>
+ SetEnvIf "^Authorization$" "(.*)" HTTP_AUTHORIZATION=$1
+</IfModule>
+<IfModule !mod_setenvif.c>
+ <IfModule mod_rewrite.c>
+ RewriteEngine on
+ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+ </IfModule>
</IfModule>