I use Cloudflare to hide my server IP and won’t disable it, even if it means not getting the real IP’s.
What I have noticed is that if I use the Cloudflare template I see my docker IP in the access.log, regardless of having this snippet or not:
- replace:
filename: /etc/nginx/conf.d/discourse.conf
from: "types {"
to: |
set_real_ip_from 172.18.0.0/24;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
types {
If I remove the Cloudflare template and use just the snippet above I see Cloudflare IP’s on my logs.