Real IP no longer recognized through proxy

I remember something about this recently but I can’t find it either. Handling the "chain of trust" of the end user's real IP - #8 by supermathie includes a link to the cloudflare template, which I think may be a good model.

Here’s what I’m doing and it seems to still work (as of “Discourse 2026.6.0-latest - GitHub - discourse/discourse: A platform for community discussion. Free, open, simple. · GitHub version 5c507d8359f4d6e8a5d98780c622d51cedbd9bd7”)

after_bundle_exec:
  - replace:
    filename: /etc/nginx/conf.d/discourse.conf
    from: "types {"
    to: |
      set_real_ip_from 192.168.1.0/24;
      set_real_ip_from 192.168.11.0/24;
      set_real_ip_from 172.16.0.0/12;
      set_real_ip_from 10.0.0.0/8;
      real_ip_recursive on;
      real_ip_header X-Forwarded-For;
      types {