summaryrefslogtreecommitdiffstats
path: root/17.0/fpm
diff options
context:
space:
mode:
Diffstat (limited to '17.0/fpm')
-rw-r--r--17.0/fpm/config/reverse_proxy.config.php11
-rwxr-xr-x17.0/fpm/entrypoint.sh6
2 files changed, 17 insertions, 0 deletions
diff --git a/17.0/fpm/config/reverse_proxy.config.php b/17.0/fpm/config/reverse_proxy.config.php
new file mode 100644
index 00000000..26a8bff3
--- /dev/null
+++ b/17.0/fpm/config/reverse_proxy.config.php
@@ -0,0 +1,11 @@
+<?php
+
+$trustedProxies = getenv('TRUSTED_PROXIES');
+
+if ($trustedProxies) {
+ $trustedProxies = array_filter(array_map('trim', explode(' ', $trustedProxies)));
+} else {
+ $trustedProxies = null;
+}
+
+$CONFIG['trusted_proxies'] = $trustedProxies; \ No newline at end of file
diff --git a/17.0/fpm/entrypoint.sh b/17.0/fpm/entrypoint.sh
index 2510743e..07b44d61 100755
--- a/17.0/fpm/entrypoint.sh
+++ b/17.0/fpm/entrypoint.sh
@@ -43,6 +43,12 @@ file_env() {
unset "$fileVar"
}
+if expr "$1" : "apache" 1>/dev/null; then
+ if [ -n "${APACHE_DISABLE_REWRITE_IP+x}" ]; then
+ a2disconf remoteip
+ fi
+fi
+
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then