Na to aby mohol poslať X-Forwarded-For by musel server umožňovať odosielanie tejto hlavičky v CORS odpovedi.