From c75d95af8bce88fd5993fdac61fba9a4198018d6 Mon Sep 17 00:00:00 2001 From: Sebastien Malot Date: Mon, 2 Nov 2026 16:45:39 +0100 Subject: [PATCH] Add RemoteIPInternalProxy for Istio sidecar IP Signed-off-by: Sebastien Malot --- 32/apache/Dockerfile | 1 + 33/apache/Dockerfile | 1 + 34/apache/Dockerfile | 1 + 35/apache/Dockerfile | 1 + update.sh | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/32/apache/Dockerfile b/32/apache/Dockerfile index e8fdf81bb..4b20d79d3 100644 --- a/32/apache/Dockerfile +++ b/32/apache/Dockerfile @@ -139,6 +139,7 @@ RUN a2enmod headers rewrite remoteip ; \ { \ echo 'RemoteIPHeader X-Real-IP'; \ echo 'RemoteIPInternalProxy 10.0.0.0/8'; \ + echo 'RemoteIPInternalProxy 127.0.0.0/8'; \ echo 'RemoteIPInternalProxy 172.16.0.0/12'; \ echo 'RemoteIPInternalProxy 192.168.0.0/16'; \ } > /etc/apache2/conf-available/remoteip.conf; \ diff --git a/33/apache/Dockerfile b/33/apache/Dockerfile index fb6e7e9e1..6e7ff1fbf 100644 --- a/33/apache/Dockerfile +++ b/33/apache/Dockerfile @@ -139,6 +139,7 @@ RUN a2enmod headers rewrite remoteip ; \ { \ echo 'RemoteIPHeader X-Real-IP'; \ echo 'RemoteIPInternalProxy 10.0.0.0/8'; \ + echo 'RemoteIPInternalProxy 127.0.0.0/8'; \ echo 'RemoteIPInternalProxy 172.16.0.0/12'; \ echo 'RemoteIPInternalProxy 192.168.0.0/16'; \ } > /etc/apache2/conf-available/remoteip.conf; \ diff --git a/34/apache/Dockerfile b/34/apache/Dockerfile index 7a6a69f37..c1d5de11f 100644 --- a/34/apache/Dockerfile +++ b/34/apache/Dockerfile @@ -139,6 +139,7 @@ RUN a2enmod headers rewrite remoteip ; \ { \ echo 'RemoteIPHeader X-Real-IP'; \ echo 'RemoteIPInternalProxy 10.0.0.0/8'; \ + echo 'RemoteIPInternalProxy 127.0.0.0/8'; \ echo 'RemoteIPInternalProxy 172.16.0.0/12'; \ echo 'RemoteIPInternalProxy 192.168.0.0/16'; \ } > /etc/apache2/conf-available/remoteip.conf; \ diff --git a/35/apache/Dockerfile b/35/apache/Dockerfile index 27604368a..0c9a9bcdd 100644 --- a/35/apache/Dockerfile +++ b/35/apache/Dockerfile @@ -139,6 +139,7 @@ RUN a2enmod headers rewrite remoteip ; \ { \ echo 'RemoteIPHeader X-Real-IP'; \ echo 'RemoteIPInternalProxy 10.0.0.0/8'; \ + echo 'RemoteIPInternalProxy 127.0.0.0/8'; \ echo 'RemoteIPInternalProxy 172.16.0.0/12'; \ echo 'RemoteIPInternalProxy 192.168.0.0/16'; \ } > /etc/apache2/conf-available/remoteip.conf; \ diff --git a/update.sh b/update.sh index aad4b9cb7..1e09e289c 100755 --- a/update.sh +++ b/update.sh @@ -33,7 +33,7 @@ declare -A base=( ) declare -A extras=( - [apache]='\nRUN a2enmod headers rewrite remoteip ; \\\n { \\\n echo '\''RemoteIPHeader X-Real-IP'\''; \\\n echo '\''RemoteIPInternalProxy 10.0.0.0/8'\''; \\\n echo '\''RemoteIPInternalProxy 172.16.0.0/12'\''; \\\n echo '\''RemoteIPInternalProxy 192.168.0.0/16'\''; \\\n } > /etc/apache2/conf-available/remoteip.conf; \\\n a2enconf remoteip\n\n# set apache config LimitRequestBody\nENV APACHE_BODY_LIMIT 1073741824\nRUN { \\\n echo '\''LimitRequestBody ${APACHE_BODY_LIMIT}'\''; \\\n } > /etc/apache2/conf-available/apache-limits.conf; \\\n a2enconf apache-limits' + [apache]='\nRUN a2enmod headers rewrite remoteip ; \\\n { \\\n echo '\''RemoteIPHeader X-Real-IP'\''; \\\n echo '\''RemoteIPInternalProxy 10.0.0.0/8'\''; \\\n echo '\''RemoteIPInternalProxy 127.0.0.0/8'\''; \\\n echo '\''RemoteIPInternalProxy 172.16.0.0/12'\''; \\\n echo '\''RemoteIPInternalProxy 192.168.0.0/16'\''; \\\n } > /etc/apache2/conf-available/remoteip.conf; \\\n a2enconf remoteip\n\n# set apache config LimitRequestBody\nENV APACHE_BODY_LIMIT 1073741824\nRUN { \\\n echo '\''LimitRequestBody ${APACHE_BODY_LIMIT}'\''; \\\n } > /etc/apache2/conf-available/apache-limits.conf; \\\n a2enconf apache-limits' [fpm]='' [fpm-alpine]='' )