$ 0 0 Turns out the X-Real-IP variable is being pulled OK in our production environment anyway, so we can work around. Thanks everyone.