هل لا يتعرف Discourse على وسم X-Forwarded-For للوكيل؟

Why would you do the redirect there? Do it at the outer layer, where you’re terminating HTTPS.