Skip to content

Commit a574990

Browse files
committed
add RemoteIPTrustedProxy to remoteip.conf
1 parent 49b24b2 commit a574990

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

php7.1/apache/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ RUN a2enmod rewrite expires remoteip
6464

6565
RUN { \
6666
echo 'RemoteIPHeader X-Forwarded-For' ; \
67+
echo 'RemoteIPTrustedProxy 10.0.0.0/8' ; \
68+
echo 'RemoteIPTrustedProxy 172.16.0.0/12' ; \
69+
echo 'RemoteIPTrustedProxy 192.168.0.0/16' ; \
6770
} > /etc/apache2/conf-available/remoteip.conf ; \
6871
a2enconf remoteip
6972

php7.2/apache/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ RUN a2enmod rewrite expires remoteip
6464

6565
RUN { \
6666
echo 'RemoteIPHeader X-Forwarded-For' ; \
67+
echo 'RemoteIPTrustedProxy 10.0.0.0/8' ; \
68+
echo 'RemoteIPTrustedProxy 172.16.0.0/12' ; \
69+
echo 'RemoteIPTrustedProxy 192.168.0.0/16' ; \
6770
} > /etc/apache2/conf-available/remoteip.conf ; \
6871
a2enconf remoteip
6972

php7.3/apache/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ RUN a2enmod rewrite expires remoteip
6565

6666
RUN { \
6767
echo 'RemoteIPHeader X-Forwarded-For' ; \
68+
echo 'RemoteIPTrustedProxy 10.0.0.0/8' ; \
69+
echo 'RemoteIPTrustedProxy 172.16.0.0/12' ; \
70+
echo 'RemoteIPTrustedProxy 192.168.0.0/16' ; \
6871
} > /etc/apache2/conf-available/remoteip.conf ; \
6972
a2enconf remoteip
7073

0 commit comments

Comments
 (0)