Discourse מציג את כתובת ה-IP של השרת/localhost ככתובת ה-IP של המשתמש

I don’t know a lot about how the Cloudflare real IP stuff works but my suspicion is that your Discourse nginx will need set_real_ip_from to be the IP address that it sees your proxy nginx as. 127.0.0.1? Some other internal address? The public address? Not sure which it would see.

Once you know what address that is, I think what I would do is leave the cloudflare template in there, then add a new replace just for set_real_ip_from.

In addition to that, your proxy nginx will need to be configured to pass along the CF-Connecting-IP header if it isn’t already configured to do so or doesn’t already do so by default. I can’t really help with this bit.