0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-20 02:46:10 +02:00

Replace RemoteIPTrustedProxy by RemoteIPInternalProxy in remoteip.conf

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-06-06 16:49:20 +02:00
parent 22d28e45cd
commit 5b84c6a2cc
3 changed files with 7 additions and 7 deletions

View file

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

View file

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

View file

@ -28,7 +28,7 @@ declare -A base=(
) )
declare -A extras=( 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]=''
[fpm-alpine]='' [fpm-alpine]=''
) )