I had a close at the end of the pipe:<div><div><br></div><div>sub vcl_pipe {</div><div>        set bereq.http.X-Forwarded-For = req.http.X-Forwarded-For;</div><div>        set bereq.http.X-Forwarded-For = regsub(bereq.http.X-Forwarded-For, "$", ", ");</div>
<div>        set bereq.http.X-Forwarded-For = regsub(bereq.http.X-Forwarded-For, "$", client.ip);</div><div>        set req.http.connection = "close";</div><div>}</div><div><br></div><div>It still isn't working as we had hoped.</div>
<div><br></div>Sincerely,<br>Doug Eubanks<br><a href="mailto:admin@dougware.net" target="_blank">admin@dougware.net</a><br>K1DUG<br>(919) 201-8750<br>
<br><br><div class="gmail_quote">On Mon, Aug 13, 2012 at 7:43 PM, Paul A. Procacci <span dir="ltr"><<a href="mailto:pprocacci@datapipe.com" target="_blank">pprocacci@datapipe.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If I'm not mistaken, once you pipe a connection to the backend machines, future requests over<br>
the same socket will be untouched.  To ensure requests always touch the vcl code that adds<br>
the header, ensure you close connections after the first request.<br>
<br>
~Paul<br>
<div class="im"><br>
On Mon, Aug 13, 2012 at 10:50:09PM +0000, Kervin L. Pierre wrote:<br>
> Did you get an answer to this question?  I'm running into the same issue.<br>
><br>
> After piping "POSTs" to get around another issues, we noticed that X-forwarded-For is not being returned to the backend server.<br>
><br>
> Is there a way to guarantee that x-forwarded-for is present on backend requests, even on pipes?<br>
><br>
> Best regards,<br>
> Kervin<br>
><br>
><br>
> Adevsoft Inc<br>
> Business Software Development<br>
> <a href="http://adevsoft.com/" target="_blank">http://adevsoft.com/</a><br>
><br>
> From: <a href="mailto:varnish-misc-bounces@varnish-cache.org">varnish-misc-bounces@varnish-cache.org</a> [mailto:<a href="mailto:varnish-misc-bounces@varnish-cache.org">varnish-misc-bounces@varnish-cache.org</a>] On Behalf Of Doug Eubanks<br>

> Sent: Friday, August 03, 2012 10:18 AM<br>
> To: <a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
> Subject: Varnish is not always adding X-Forwarded-For<br>
><br>
> We need Varnish to always add X-Forwarded-For so that we can see the visitor's IP when they submit a poll answer.<br>
><br>
> We have this setup, but we are still seeing about half of our requests not include the X-Forwarded-For header.<br>
><br>
> sub vcl_pipe {<br>
</div>> ?? ?? ?? ?? set bereq.http.X-Forwarded-For = req.http.X-Forwarded-For;<br>
> ?? ?? ?? ?? set bereq.http.X-Forwarded-For = regsub(bereq.http.X-Forwarded-For, "$", ", ");<br>
> ?? ?? ?? ?? set bereq.http.X-Forwarded-For = regsub(bereq.http.X-Forwarded-For, "$", client.ip);<br>
> ?? ?? ?? ?? set req.http.connection = "close";<br>
<div class="im">> }<br>
><br>
> Sincerely,<br>
> Doug Eubanks<br>
> <a href="mailto:admin@dougware.net">admin@dougware.net</a><br>
> K1DUG<br>
> <a href="tel:%28919%29%20201-8750" value="+19192018750">(919) 201-8750</a><br>
> _______________________________________________<br>
> varnish-misc mailing list<br>
> <a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
> <a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
<br>
</div>________________________________<br>
<br>
This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See <a href="http://www.datapipe.com/legal/email_disclaimer/" target="_blank">http://www.datapipe.com/legal/email_disclaimer/</a> for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you.<br>

<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</div></div></blockquote></div><br></div>