Replace RemoteIPTrustedProxy by RemoteIPInternalProxy in remoteip.conf (#2004)

Else the internal IP ranges are ignored
See https://httpd.apache.org/docs/2.4/en/mod/mod_remoteip.html#remoteiptrustedproxy and https://httpd.apache.org/docs/2.4/en/mod/mod_remoteip.html#remoteipinternalproxy

Signed-off-by: Mossroy <mossroy@mossroy.fr>
This commit is contained in:
Mossroy 2023-08-20 23:19:13 +02:00 committed by GitHub
parent c4966442a6
commit 04e4138db5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -124,9 +124,9 @@ VOLUME /var/www/html
RUN a2enmod headers rewrite remoteip ;\
{\
echo RemoteIPHeader X-Real-IP ;\
echo RemoteIPTrustedProxy 10.0.0.0/8 ;\
echo RemoteIPTrustedProxy 172.16.0.0/12 ;\
echo RemoteIPTrustedProxy 192.168.0.0/16 ;\
echo RemoteIPInternalProxy 10.0.0.0/8 ;\
echo RemoteIPInternalProxy 172.16.0.0/12 ;\
echo RemoteIPInternalProxy 192.168.0.0/16 ;\
} > /etc/apache2/conf-available/remoteip.conf;\
a2enconf remoteip

View File

@ -125,9 +125,9 @@ VOLUME /var/www/html
RUN a2enmod headers rewrite remoteip ;\
{\
echo RemoteIPHeader X-Real-IP ;\
echo RemoteIPTrustedProxy 10.0.0.0/8 ;\
echo RemoteIPTrustedProxy 172.16.0.0/12 ;\
echo RemoteIPTrustedProxy 192.168.0.0/16 ;\
echo RemoteIPInternalProxy 10.0.0.0/8 ;\
echo RemoteIPInternalProxy 172.16.0.0/12 ;\
echo RemoteIPInternalProxy 192.168.0.0/16 ;\
} > /etc/apache2/conf-available/remoteip.conf;\
a2enconf remoteip

View File

@ -29,7 +29,7 @@ declare -A base=(
)
declare -A extras=(
[apache]='\nRUN a2enmod headers rewrite remoteip ;\\\n {\\\n echo RemoteIPHeader X-Real-IP ;\\\n echo RemoteIPTrustedProxy 10.0.0.0/8 ;\\\n echo RemoteIPTrustedProxy 172.16.0.0/12 ;\\\n echo RemoteIPTrustedProxy 192.168.0.0/16 ;\\\n } > /etc/apache2/conf-available/remoteip.conf;\\\n a2enconf remoteip'
[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'
[fpm]=''
[fpm-alpine]=''
)