option.xfwd - add header "X-Forwarded-Host"

Author: chimuraiCreated Sep 24, 2015Updated May 19, 2025

Should X-Forwarded-Host be added when xfwd is set to true?

Current x-forwarded-* fields:

  • x-forwarded-for
  • x-forwarded-port
  • x-forwarded-proto

x-forwarded-port is probably redundant as x-forwarded-host includes the port number. See Wikipedia

Implementation of xfwd code

Source: http-party/node-http-proxy