--- a/nginx.conf +++ b/nginx.conf @@ -26,6 +26,12 @@ upstream php-handler { server app:9000; } + + set_real_ip_from 10.0.0.0/8; + set_real_ip_from 172.16.0.0/12; + set_real_ip_from 192.168.0.0/16; + real_ip_header X-Forwarded-For; + real_ip_recursive on; server { listen 80;