I think that Running other websites on the same machine as Discourse shows how to include the correct setting to see that X-forwarded-for works correctly.
If you look at /admin /users or the rails log, do you see that all traffic is attributed to your load balancer?