[Varnish] #203: X-Forwarded-For handling
Varnish
varnish-bugs at projects.linpro.no
Thu Feb 14 10:55:22 CET 2008
#203: X-Forwarded-For handling
---------------------------+------------------------------------------------
Reporter: des | Owner: des
Type: enhancement | Status: assigned
Priority: normal | Milestone:
Component: documentation | Version: trunk
Severity: normal | Resolution:
Keywords: |
---------------------------+------------------------------------------------
Comment (by phk):
The reason I did it in the C-code originally was because we did not have
the necessary VCL header-editing facilities.
Today you can actually say:
{{{
if (bereq.http.x-forwarded-for) {
set bereq.http.X-forwarded-for =
bereq.http.X-forwarded-for ", "
regsub(client.ip, ":.*", "");
} else {
set bereq.http.X-forwarded-for =
regsub(client.ip, ":.*", "");
}
}}}
I'm not sure I see the benefit of pushing this to the default VCL given
that the quite sensible default (moduls append bug) can be overridden
already.
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/203#comment:6>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list