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,12 +40,14 @@ ...@@ -40,12 +40,14 @@
*/ */
sub vcl_recv { sub vcl_recv {
if (req.restarts == 0) {
if (req.http.x-forwarded-for) { if (req.http.x-forwarded-for) {
set req.http.X-Forwarded-For = set req.http.X-Forwarded-For =
req.http.X-Forwarded-For ", " client.ip; req.http.X-Forwarded-For ", " client.ip;
} else { } else {
set req.http.X-Forwarded-For = client.ip; set req.http.X-Forwarded-For = client.ip;
} }
}
if (req.request != "GET" && if (req.request != "GET" &&
req.request != "HEAD" && req.request != "HEAD" &&
req.request != "PUT" && req.request != "PUT" &&
......
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