[Twisted-Python] ReverseProxy doesn't send X-Forwarded-For header

Andrew Bennetts andrew-twisted at puzzling.org
Mon Jun 2 23:18:19 MDT 2003


On Tue, Jun 03, 2003 at 12:08:33AM -0500, Lance Kurisaki wrote:
> I understand your reasons and agree. My only reservation is that if
> someone wants to send the header, it's not immediately obvious (wasn't
> to me, anyway) what the proper line of code is and where it should go.
> It took me a while to figure it out.
> 
> Perhaps if we make it dependent on an instance attribute, such as
> "sendXForwardedFor", which is by default set to 0?

A simpler solution may be to simply stick a note in the docstring saying "To
be a polite proxy that announces what address the request originates from,
use this line: ...".  This might be more verbose than simply adding the
flag, though.

-Andrew.





More information about the Twisted-Python mailing list