Commit b3ad75ee authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Don't mess with X-forwarded-for on restarts.

Fixes: #758



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5113 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 9c367cbd
......@@ -40,11 +40,13 @@
*/
sub vcl_recv {
if (req.http.x-forwarded-for) {
set req.http.X-Forwarded-For =
req.http.X-Forwarded-For ", " client.ip;
} else {
set req.http.X-Forwarded-For = client.ip;
if (req.restarts == 0) {
if (req.http.x-forwarded-for) {
set req.http.X-Forwarded-For =
req.http.X-Forwarded-For ", " client.ip;
} else {
set req.http.X-Forwarded-For = client.ip;
}
}
if (req.request != "GET" &&
req.request != "HEAD" &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment