option.xfwd - add header "X-Forwarded-Host"
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
Should X-Forwarded-Host be added when xfwd is set to true?
Forwarding for web is actually adds the x-forwarded-host header
https://github.com/nodejitsu/node-http-proxy/blob/master/lib/http-proxy/passes/web-incoming.js#L56
I'm not sure but it looks like forwarding of WS should work in the same manner.
x-forwarded-port is probably redundant as x-forwarded-host includes the port number
Yes, your right, I read a spec and it says that X-Forwarded-Host is exactly the same as original Host header and it MAY contain a port number
Yes it seems this does works for web, but not for ws.