¿La etiqueta proxy X-Forwarded-For no es reconocida por Discourse?

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