This question already has an answer here:

Is there a way to prevent the X-Forwarded-For from being spoofed in haproxy?

i.e. Can I rename that header to something else? Or is there another way to forward on the correct IP address of the client?

marked as duplicate by ceejayoz, longneck, Michael Hampton Sep 7 '18 at 19:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I'm not really sure that I understand the answer to that question. If you delete the X-Forwarded-For header, how can you get the client's IP address? Surely the X-Forwarded-For won't exist then? – Wayne Sep 7 '18 at 19:31
  • 2
    The answer states that haproxy removes any such header the client sends, and inserts its own, when the given configuration is used. – Michael Hampton Sep 7 '18 at 19:33

Browse other questions tagged or ask your own question.